System Administration Guide: Advanced Administration

ProcedureHow to Fix a Corrupted wtmpx File

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Change to the /var/adm directory.

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

    # /usr/lib/acct/fwtmp < wtmpx > wtmpx.ascii 
  4. Edit the wtmpx.ascii file 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 the fwtmp(1M) man page for more information.