Become superuser.
Change to the /var/adm directory.
Convert the wtmpx file from binary to ASCII format.
# /usr/lib/acct/fwtmp < wtmpx > wtmpx.ascii |
Edit wtmpx.ascii to delete the corrupted records.
Convert the wtmpx.ascii file back to a binary file.
# /usr/lib/acct/fwtmp -ic < wtmpx.ascii > wtmpx |
See fwtmp(1M) for more information.