[comp.sys.hp] Corrupt utmp entry on HPs

iwarner@axion.bt.co.uk (Ivan Warner) (01/25/91)

We are having problems with two of our HP clusters, which continually
get corrupt utmp entries, resulting in the following message upon
attempted login:

	No utmp entry.You must exec "login" from the lowest level "sh".

I've spoken to HP, and they think it may be an X client causing the
problem. We are running MIT's X11R4, patch level 18 on both clusters.
One cluster is running HP-UX 6.5, the other HP-UX 7.0

Anybody seen this, or know what causes it?

	Thanks in advance
	Ivan Warner
	British Telecom Research Labs

tom@ssd.csd.harris.com (Tom Horsley) (01/26/91)

I don't know if you have the same problem as we do at here, but we had this
happen because some code in xterm was doing a strcpy rather than a strncpy
when setting up the utmp entry it was going to create. Everything was
working fine until we started using the name daemon, then names that used to
be things like "sys1" turned into names like "sys1@blah.blah.blah.blah" and
the field it was writing the remote system name in wrote across a bunch of
data in subsequent fields of the utmp entry.

The wonderful unix library routines then are perfectly willing to insert
gibberish into the utmp file, but the other wonderful unix library routines
that read utmp files are not willing to skip corrupted entries.

On the other hand, the specific error you mentioned:

	No utmp entry.You must exec "login" from the lowest level "sh".

I often find is caused by running out of ptys.
--
======================================================================
domain: tahorsley@csd.harris.com       USMail: Tom Horsley
  uucp: ...!uunet!hcx1!tahorsley               511 Kingbird Circle
                                               Delray Beach, FL  33444
+==== Censorship is the only form of Obscenity ======================+
|     (Wait, I forgot government tobacco subsidies...)               |
+====================================================================+

diingyu@hpss2.HP.COM (Diing Yu Chen) (01/28/91)

Hi,

One of the possible reason for the problem that you have observed is 
due to the differences in HP-UX 6.X and HP-UX 7.0. The utmp format
has changed! What happens is that when you use the xterm that was coded
for HPUX 6.X (or hpterm for that matter) on HPUX 7.0 or vice versa,
the data written to the utmp file is different enough to cause NULL
entries in the table which cause the screwup that you have seen.

The key to remember is to use the right version of xterm on the right
version of OS.

regards

Diing Yu Chen 	diingyu@hpss2
Hewlett Packard Sales Singapore