Multiple utmp entries: Howzit happen?
Jim Rosenberg
jr at oglvee.UUCP
Wed Dec 13 05:05:30 AEST 1989
We are suffering from a recurring arthritis of the loginism. The symptoms
range from pain in the outer mail utilities all the way to collapse of the
HDB validation. It seemed pretty clear something was going wrong with
/etc/utmp, and sure enough that proved to be the case. We keep getting (or
should I say gettying?) just a couple or three tty lines with more than one
entry in /etc/utmp. Here's an example:
LOGIN tty12 Dec 11 18:24 . 11884
jr tty12 Dec 12 08:19 . 11884
The above two lines were grepped from a who -a listing. I *thought* /etc/utmp
was only supposed to have one entry per tty. It appears that utilities don't
all do the same thing regarding utmp: Some assume that the first matching
entry is correct, others take the trouble to search the whole file. Elm, for
instance, has no trouble with this situation and realizes that I'm jr, not
LOGIN. But the elm utilities wnewmail and from will no longer work right when
the second utmp entry for tty12 materializes. (This is elm 2.1, 2.2 may fix
this for all I know.)
Our version of HDB messes up badly under these conditions. When I get a second
utmp entry for the modem line, it appears in doing site validation HDB is
pulling off the login name from the first (WRONG!) utmp entry. It concludes
the user is LOGIN. But then it seems to know this can't be right (no passwd
entry for LOGIN?) so it paws through /etc/passwd for the first entry that
matches by uid. Not fun at all if you have multiple uuwhoever logins all with
the same uid as uucp. So when the modem line acquires a callus of the utmpnail
HDB validation suddenly starts failing.
This is really annoying. I've fixed it by going single-user and catting
/dev/null >/etc/utmp, but now it's come back. Does anybody know how this
happens? Our system is an Altos 2000 with Altos UNIX 5.3.1 d. [Please excuse
if this is one of those oft-discussed questions; I've been buried under a mound
of MIS work lately & haven't had much time to read news.]
--
Jim Rosenberg pitt
Oglevee Computer Systems >--!amanue!oglvee!jr
151 Oglevee Lane cgh
Connellsville, PA 15425 #include <disclaimer.h>
More information about the Comp.unix.wizards
mailing list