SUMMARY: no utmpx entry

Oscar Goldes (ogolde@impsat1.com.ar)
Fri, 28 Nov 1997 21:26:29 -0300

Original question:

I cannot telnet to a Ultra/ Solaris 2.5 from several other machines, even
from itself

I get this messages:
>telnet orca
Trying 1.0.0.17...
Connected to orca.
Escape character is '^]'.

UNIX(r) System V Release 4.0 (orca)

login: gppdesa
Password:
No utmpx entry. You must exec "login" from the lowest level "shell".
Connection closed by foreign host.
>

The utmpx file does exist and is writable.
I can rsh and rlogin.
I can even telnet from some PCs.

Thanks to:

K.Ravi
A. de Luca
Joel Lee
Patrick Fung
Vikas Arora
PARTHIV SHAH
and others

Most of them suggested checking the permissions of utmpx, and the free
space on /var filesystem. This was not the case however.
Alfredo De Luca suggested just removing utmpx in single user mode, I did
something very similar.

Solution:

The /var/utmpx file was corrupt, and some text stuff (a couple of error
messages) had somehow managed to get in the middle of it.

Truncating the file (> /var/adm/utmpx) solved the problem, I know this may
not be the best approach, and that some commands like who and finger may
fail afterwards.

I found the cause doing a truss -f to login while telnetting, and noticing
it did fail after reading a text message. A "strings /var/adm/utmpx" showed
the message, which did not exist on a machine working properly, and had
nothing to do there.

I suppose that the fact that from some PCs I could telnet has to do with
the position of the corrupting string inside the file. A number of records
in good health existed before the message. If the entry for the machine
from which the telnet was done was found before the string, it worked OK.
If the entry was after it (or if it had to be created, it was appended to
the file) the corrupting message was found before login had the chance of
seeing the right entry

Again, thanks to all.
-- Oscar Goldes
-- Orden Argentina SA