System Administration Guide: Advanced Administration

How to Fix a Corrupted wtmpx File

  1. Become superuser.

  2. Change to the /var/adm directory.

  3. Convert the wtmpx file from binary to ASCII format.


    # /usr/lib/acct/fwtmp < wtmpx > wtmpx.ascii 
    
  4. Edit wtmpx.ascii to delete the corrupted records.

  5. Convert the wtmpx.ascii file back to a binary file.


    # /usr/lib/acct/fwtmp -ic < wtmpx.ascii > wtmpx
    

    See fwtmp(1M) for more information.