Re: wtmp file
your method is not safe
wtmp is not an ascii file
you need to do the following:
/usr/sbin/acct/fwtmp < /var/adm/wtmp > /tmp/tmpfile
tail -500 /tmp/tmpfile > /tmp/tmpfile2
/usr/sbin/acct/fwtmp -ic < /tmp/tmpfile2 > /var/adm/wtmp
rm /tmp/tmpfile
rm /tmp/tmpfile2
make sure you have bos.acct installed to use the fwtmp command
On Mon, 22 Sep 2003 10:25:05 -0400, sengstock3
<member25238@dbforums.com> wrote:
>
>I've seen a bunch of posts about this file, but I just want to be
>sure anyway..
>
>
>
>Is it safe for me to set up a cron job to truncate this file?
>
>
>
>ex:
>
>
>
>tail -500 wtmp > tmpfile
>
>mv tmpfile wtmp
>
>chmod 664 wtmp
>
>
>
>
>
>or do I have to do something special to it?
>
>
>
>I am on AIX 4.3.3 |