Fixing wtmp Errors
The wtmp files sometimes cause problems
in the day-to-day operation of the accounting system.
When the date is changed
and the system is in multiuser state,
a set of date change records
is written into
The wtmpfix program
is designed to adjust the timestamps
in the wtmp
records when a date change is encountered.
However, some combinations of date changes and reboots
may slip through wtmpfix and cause acctcon
To patch up a wtmp file:
Change to the directory /var/adm/acct/nite.
To convert the corrupted binary record to a formatted
ASCII form, execute:
fwtmp < wtmp.MMDD > xwtmp
where MMDD is the numeric date suffix of the file you
want to patch.
Edit the file xwtmp
and delete corrupted records or
delete all records from the beginning
up to the date change.
Write and quit the file xwtmp.
To convert the patched file back to the binary form needed
by the accounting utilities, execute
fwtmp -ic < xwtmp > wtmp.MMDD
If the wtmp
file is beyond repair, create a null
The existence of this null file
prevents any charging of connect time.
As a side effect, the lack of a
wtmp file prevents acctprc
from identifying the login
that owned a particular process.
When this happens, the process is charged to
the owner of the first login in the
password file for the appropriate user ID.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004