Technical article 104857

Log in and get "no utmp entry. You must log in from lowest level -sh".

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5

Written · Last revised

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/wtmpx
4. Shutdown the system:
# shutdown -y -g0
NOTE:     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.

From the Xinuos technical article database, record 104857. Reproduced with permission. The original is at www.sco.com/ta/104857, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.