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

last

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

How did you create the new wtmp file?

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

Should create a new empty file for you.

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.

/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.

bakunin

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