System Administration Guide

How to Fix a wtmp File

  1. Become superuser.

  2. Change to the /var/adm/acct/nite directory.

  3. Convert the binary file wtmp.MMDD into the ASCII file xwtmp.


    # fwtmp wtmp.MMDD xwtmp
    

    MMDD

    Pair of two-digit numbers representing the month and day. 

  4. Edit xwtmp. Delete the corrupted files, or delete all records from the beginning up to the date change.

  5. Convert the ASCII file xwtmp to a binary file, overwriting the corrupted file.


    # fwtmp -ic xwtmp wtmp.MMDD