Problem
I am trying to log in as a user, or as root in multiuser mode. After entering the password, this error message is displayed age and the system will not return a prompt:
No utmp entry. You must log in from lowest level -sh Cause
One or more of the files /etc/utmp, /etc/wtmp, and /etc/utmpx has been corrupted or truncated. Note that, in particular, a successful login on the console or a serial terminal depends upon the presence of valid content in one or more of these files. It has been observed that some system adminstrators wrongly zero out these files upon system startup in order to "clean" them. Thus, if some sort of corruption is suspected and you wish to zero out these files, rebooting the system is necessary in order to restore these files after zeroing them.
Solution
These files are log files. They can become zero length
without affecting the system, as long as you reboot the system
after truncating the files. Perform these steps:1. Bring the system into System Maintenance mode.
2. Make copies of the files /etc/utmp, /etc/utmpx, /etc/wtmp, and /etc/wtmpx before proceeding with the next step.
3. Delete the contents of these files by executing the following commands:
# > /etc/utmp
# > /etc/wtmp
# > /etc/utmpx
# > /etc/wtmpx4. Shutdown the system:# shutdown -y -g0NOTE: If desired, you can see what is in these files by using the
fwtmp(AMD) command (located in /usr/lib/acct). It is possible
to save the output to a file, and after editing save back with
the "fwtmp -ic" command.