Installation guide

Table 12–6: The utmp ASCII Conversion Structure Members (cont.)
Field Member Description
8
ut_time
The starting time (in seconds).
9
ut_host
The host name, which must have exactly
sizeof(ut_host) characters.
12.4.1 The wtmpfix Command
The /usr/sbin/acct/wtmpfix command corrects date and time stamp
inconsistencies in files with the utmp.h header file structure and displays
the records. The runacct script invokes the wtmpfix command.
Each time a date is entered in the /var/adm/wtmp file (for example, at
system startup or by using the date command), a pair of date-change
records is also written to the wtmp file. The first date-change record is the
old date, which is specified in the ut_line and ut_type fields. The second
date-change record is the new date, which is also specified in the ut_line
and ut_type fields. The wtmpfix command uses these records to
synchronize all date and time stamps in the /var/adm/wtmp file, and then
the date-change record pair is removed. The date-change records never
appear in an output file.
The wtmpfix command also checks the validity of the user name field (the
ut_user field) to ensure that the name consists only of alphanumeric
characters, a dollar sign ($), or spaces. If an invalid name is detected, the
wtmpfix command changes the login name to INVALID and displays a
diagnostic message.
The wtmpfix command has the following syntax:
/usr/sbin/acct/wtmpfix
[ filename]...
The
filename
variable specifies the name of the input file. The default
input file is the /var/adm/wtmp binary file.
12.4.2 The fwtmp Command
The fwtmp command allows you to correct wtmp files. The command
converts binary records from files with the utmp.h header file structure to
formatted ASCII records. You can edit the ASCII version of a wtmp file to
repair bad records or for general file maintenance. Table 12–6 shows the
ASCII structure you should use.
Administering the System Accounting Services 12–15