Visit The New, Modern Unix Linux Community

wtmp file

Thread Tools Search this Thread
Operating Systems AIX wtmp file
# 1  
wtmp file

Hello everyone

I have a problem with the file wtmp that is on /var/adm

This file was not on this directory (adm).

I try creating a new file with the correct rights (644) and owner (adm:adm)

but It doesnt work.

If I type the last command i get this


ora10g Feb 24 13:16 - 13:16 (00:00)

wtmp begins Feb 24 13:16

How can I create the right wtmp file

Thanks in advance
# 2  
How did you create the new wtmp file?

cd /var/adm
/usr/sbin/acct/nulladm >wtmp

Should create a new empty file for you.
# 3  
Why do you need to create it? I deleted it the last time it filled up the directory. What is the need for the file? Just wondering.
# 4  
/var/adm/wtmp holds accounting information. You will get a detailed explanation by reading the manpage for it (yes, there is one): "man wtmp".

You can of course delete it, but chances are you do your filesystem no good, because /var/adm/wtmp is constantly being written to. Also you will change the inode of the file which some system routines won't like very much.

If you want to trim it with the system running use:

cat /dev/null > /var/adm/wtmp

To remedy your problem: boot in maintenance mode, remove the file, reboot. The file will be created correctly. From then on you can use the above mentioned procedure to trim it.

I hope this helps.

# 5  
wtmp file

Thanks dukessd and bakunin for your answers.

Thatīs resolve the problem.

Im new in the company and I taking care aix box and there many things to fix and change.

Thanks again

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #536
Difficulty: Medium
The "null" keyword is only used to refer to uninitialized or missing data.
True or False?

9 More Discussions You Might Find Interesting

1. AIX

wtmp file - is there a patch to export the data another file each day?

sorry for being a noob, i am trying to find which user accessed the server at what time and there ip address at first i used who command but the output didn't contain the ip address then i used the last command which provided me with the ip of the users but when i searched i searched and found that... (1 Reply)
Discussion started by: hercules_1010
1 Replies

2. AIX

Impacts of emptying /var/adm/wtmp file ?

In our operating procedures, if a workstation has a space problem in the /var filesystem, one of the most frequent case we were told is the size of the /var/adm/wtmp file. Someone once told me it is dangerous to do this. Is it ? I cannot say for certain that whomever wrote that procedure is... (2 Replies)
Discussion started by: Browser_ice
2 Replies

3. AIX

WTMP file cleared after upgrade

Hello, we recently upgraded from AIX 5.2.9 to 5.3.6 and in the process the wtmp file was cleared out. Before the upgrade the system had not been rebooted in a very long time, so i'm curious if the clearing of the file is related to the upgrade or the reboot? If it was related to the reboot is... (2 Replies)
Discussion started by: zuessh
2 Replies

4. UNIX for Dummies Questions & Answers

truncate wtmp

I have AIX5.1 I have been trying to learn how to truncate the /var/adm/wtmp file. I have seen several things on google actually but don't quite understand. I also searched your forums but couldn't find it. one says this ">/var/adm/wtmp Is that all I do? I have a seperate question also. I was... (1 Reply)
Discussion started by: rocker40
1 Replies

5. Programming

Displaying fields in wtmp file?

Anyone have any idea on how to display the fields for each record stored in the wtmp file using C? Am I correct in thinking that the info stored in wtmp is in binary and that utmpx will be of some help? Being a beginner, I can come up with bits and pieces of what I might need in order to do the... (1 Reply)
Discussion started by: eclapton1
1 Replies

6. UNIX for Dummies Questions & Answers


Hi, is it ok if i delete wtmp on HPUX 11 under /var/adm It is filling up that filesystem Cheers (2 Replies)
Discussion started by: dsharples
2 Replies

7. UNIX for Dummies Questions & Answers

Resetting WTMP?

When I type last oracle I get dates from Nov 28, 2000 all the way back to the beginning of time it seems. The 11-28-2000 entry states that Oracle is still logged in, but if you type a who, it shows only 1 entry - the currently logged in user (Me as oracle), but I logged in only minutes ago - and... (4 Replies)
Discussion started by: cuppjr
4 Replies

8. UNIX for Dummies Questions & Answers

manage the wtmp file

Here's a usefull perl script to trim the wtmp file, in case it got too big, which happens sometimes, or got curropted (which also happens often). You could learn from here how to parse the wtmp file... but of course for just reading its content always simply use "last" like Neo said.... ... (0 Replies)
Discussion started by: me2unix
0 Replies

9. UNIX for Dummies Questions & Answers

Need Wtmp Reader

I would loke to read the WTMP file. This is a binary file in the /var/logs directory. Is there any utility which will convert this binary file to ASCII format? (1 Reply)
Discussion started by: pgold1
1 Replies

Featured Tech Videos