How To
Summary
The /var/adm/wtmp file collects login and logout records used by system accounting. If this file becomes corrupted, there are two methods that might fix the file.
Objective
Describe how to use wtmpfix and fwtmp to fix the /var/adm/wtmp file.
Steps
# /usr/sbin/acct/wtmpfix < /var/adm/wtmp > /tmp/wtmp.bin.fix |
# /usr/sbin/acct/fwtmp < /tmp/wtmp.bin.fix >/tmp/wtmp.ascii.post |
# mv /var/adm/wtmp /var/adm/wtmp.old # mv /tmp/wtmp.bin.fix /var/adm/wtmp # chmod 664 /var/adm/wtmp # chown adm:adm /var/adm/wtmp |
# /usr/sbin/acct/fwtmp < /var/adm/wtmp >/tmp/wtmp.ascii.pre |
# vi /tmp/wtmp.ascii.pre |
# /usr/sbin/acct/fwtmp -ic < /tmp/wtmp.ascii.pre > /tmp/wtmp.bin.fix |
# mv /var/adm/wtmp /var/adm/wtmp.old # mv /tmp/wtmp.bin.fix /var/adm/wtmp # chmod 664 /var/adm/wtmp # chown adm:adm /var/adm/wtmp |
# last # /usr/sbin/acct/fwtmp < /var/adm/wtmp >/tmp/wtmp.ascii.post |
# /usr/sbin/acct/nulladm /var/adm/wtmp |
Additional Information
SUPPORT |
---|
If you require more assistance, use the following step-by-step instructions to contact IBM to open a case for software with an active and valid support contract. 1. Document (or collect screen captures of) all symptoms, errors, and messages related to your issue. 2. Capture any logs or data relevant to the situation. 3. Contact IBM to open a case: -For electronic support, see the IBM Support Community: 4. Provide a clear, concise description of the issue. - For guidance, see: Working with IBM AIX Support: Describing the problem. 5. If the system is accessible, collect a system snap, and upload all of the details and data for your case. - For guidance, see: Working with IBM AIX Support: Collecting snap data |
Related Information
Was this topic helpful?
Document Information
Modified date:
26 October 2023
UID
ibm16327195