Manipulates connect-time accounting records by correcting date and time stamp inconsistencies.
/usr/sbin/acct/wtmpfix [ File ... ]
The wtmpfix command is called by the runacct procedure to examine standard input or Files that contain records in wtmp format, and correct problems that could make the acctcon1 or acctcon2 commands fail. The wtmpfix command corrects date and time stamp inconsistencies, and writes the corrected records to standard output. If the date and time stamps are not consistent when the acctcon1 command runs, the acctcon1 command generates an error and stops.
The wtmpfix command also checks the validity of the name field to ensure that it consists only of alphanumeric characters, a $ (dollar sign), or spaces. If the name is invalid, the wtmpfix command changes the login name to INVALID and writes a diagnostic message to standard error. In this way, the wtmpfix command reduces the chance that the acctcon2 command will fail.
Each time the date is set (on system startup or with the date command), a pair of date change records is written to the /var/adm/wtmp file. The first record is the old date, denoted by the old time string. The old time string is placed in the line field and the OLD_TIME flag is placed in the type field. The second record is the new date, denoted by the string new time. The new time string is placed in the line field and the NEW_TIME flag is placed in the type field. The wtmpfix command uses these records to synchronize all date and time stamps in the file.
None.
Item | Description |
---|---|
File | Specifies the file to examine that contains records in wtmp format. |
Access Control: These commands should grant execute (x) access only to members of the adm group.
/usr/sbin/acct/wtmpfix /var/adm/wtmp > /tmp/dummy.file
Item | Description |
---|---|
/usr/sbin/acct/wtmpfix | Contains the wtmpfix command. |
/var/adm/wtmp | Contains records of date changes that include an old date and a new date. |
/usr/include/utmp.h | Contains history records that include a reason, date, and time. |