[comp.unix.wizards] invisible to who

gfl@tuhold (Gerhard Fleischanderl) (12/28/88)

On a dial-in line at a MicroVAX-II (Ultrix 2.0), we encounter
a strange phenomenon:
A login on this line (tty03) is not recognized by who(1) nor finger(1).
However, the login-shell is shown for TTY 03 by ps(1).

There is a hard link between /dev/tty03 and /dev/ttyd0. At the next login,
ttyd0 is reported as name of the terminal-line with "Last login: ...".
Furthermore, a DIALUP is recorded for ttyd0 in the syslog-file.

who(1) had worked correctly before ttyd0 has been created (renamed from
tty03 by uucpsetup(8), manually installed as a hard-link to tty03).
If /dev/ttyd0 is renamed, everything works fine again. ("Last login:"
reports tty03, there is nothing recorded to the syslog-file.)

Does Ultrix handle a device with name "ttyd0" in a special way?
This "invisible login" isn't threatening, nevertheless we want to fix it.
Any comments are welcome.


Gerhard Fleischanderl

Databases and Expert Systems Subdivision, Technical University Vienna
Paniglgasse 16,  A-1040 Vienna,  Austria
e-mail (UUCP): ...!mcvax!tuvie!tuhold!gfl

jec@iuvax.cs.indiana.edu (James E. Conley) (12/29/88)

	Someone probably just hacked a program to take themselves out of
utmp so they wouldn't be interrupted.  I know of one person that used to do
that a lot around here and someday I may get frustrated enough to write a
version for myself.

James Conley
Indiana University Computer Science
jec@iuvax.cs.indiana.edu

dave@cs.wisc.edu (Dave Cohrs) (12/29/88)

In article <1499@tuhold> gfl@tuhold (Gerhard Fleischanderl) writes:
>On a dial-in line at a MicroVAX-II (Ultrix 2.0), we encounter
>a strange phenomenon:
>A login on this line (tty03) is not recognized by who(1) nor finger(1).
>However, the login-shell is shown for TTY 03 by ps(1).
>
>There is a hard link between /dev/tty03 and /dev/ttyd0. At the next login,
>ttyd0 is reported as name of the terminal-line with "Last login: ...".
>Furthermore, a DIALUP is recorded for ttyd0 in the syslog-file.

Get rid of the hard link.  The various programs, like ps, who and login
have problems with tty's with identity crises.  Either call the thing
"tty03" everywhere, including in /dev, or "ttyd0", but don't give it
two names.  The problem is that some programs use /etc/ttys (or whatever)
to map the tty name into things, and other programs search /dev until
they find a matching major/minor number.  The search stops on the *first*
file with the correct major/minor number, which might not have the same
name as the tty mentioned in /etc/ttys, and viola, the user doesn't show
up in "who".

Ultrix may have additional problems with skitzo tty's, but the above
is the basic problem.  I'd suggest "rm /dev/tty03" and treat the thing
like a dialup line.

dave cohrs
--
Dave Cohrs
+1 608 262-6617                        UW-Madison Computer Sciences Department
dave@cs.wisc.edu                       ...!{harvard,rutgers,ucbvax}!uwvax!dave

peter@thirdi.UUCP (Peter Rowell) (12/30/88)

In article <1499@tuhold> gfl@tuhold (Gerhard Fleischanderl) writes:
>
>On a dial-in line at a MicroVAX-II (Ultrix 2.0), we encounter
>a strange phenomenon:
>A login on this line (tty03) is not recognized by who(1) nor finger(1).
>However, the login-shell is shown for TTY 03 by ps(1).
>
>There is a hard link between /dev/tty03 and /dev/ttyd0.
> ...
>who(1) had worked correctly before ttyd0 has been created (renamed from
>tty03 by uucpsetup(8), manually installed as a hard-link to tty03).
>If /dev/ttyd0 is renamed, everything works fine again. ("Last login:"
>reports tty03, there is nothing recorded to the syslog-file.)
>
>Does Ultrix handle a device with name "ttyd0" in a special way?
>This "invisible login" isn't threatening, nevertheless we want to fix it.

Ah indeed.  We have had the same problems under both 4.2 and 4.3, so
I guess the problem is generic, rather than Ultrix specific.

The "fix" (at least for us) is to *rename* /dev/tty03 to /dev/ttyd0,
not just link it (which seems like the perfectly reasonable thing to
do).  There appears to be something funny about how "who" figures out
what is going on and it seems to be upset if there is more than one
device with the same major/minor numbers.

Are there any guru's who can explain this? Fix this?

----------------------------------------------------------------------
Peter Rowell				"He found the missing link!"
Third Eye Software, Inc.		(415) 321-0967
Menlo Park, CA  94025			peter@thirdi.UUCP

kai@uicsrd.csrd.uiuc.edu (12/30/88)

You might also want to look into the /etc/ttys file to see which line (tty03
or ttyd0) the getty is being started for.  If both are referencing the same
device, you should only be starting the getty for the one you want the system
to recognize.

Also make sure both lines are in /etc/ttytype to make sure both lines are
defined.  I've found several programs (for example: rwho) that ignore lines
not listed in there.


Patrick Wolfe  (pat@kai.com, kailand!pat)

bdb@becker.UUCP (Bruce Becker) (12/31/88)

In article <446@thirdi.UUCP> peter@thirdi.UUCP (Peter Rowell) writes:
+-----------------------
|In article <1499@tuhold> gfl@tuhold (Gerhard Fleischanderl) writes:
|>
|>On a dial-in line at a MicroVAX-II (Ultrix 2.0), we encounter
|>a strange phenomenon:
|>A login on this line (tty03) is not recognized by who(1) nor finger(1).
|>However, the login-shell is shown for TTY 03 by ps(1).
|>
|>There is a hard link between /dev/tty03 and /dev/ttyd0.
|> ...
|The "fix" (at least for us) is to *rename* /dev/tty03 to /dev/ttyd0,
|not just link it (which seems like the perfectly reasonable thing to
|do).  There appears to be something funny about how "who" figures out
|what is going on and it seems to be upset if there is more than one
|device with the same major/minor numbers.
|
|Are there any guru's who can explain this? Fix this?
+-----------------------                   /^^^^^^^^\
	Why fix what ain't broke? ________/          \_________
	The explanation about the routines finding the first
	/dev directory entry whose major/minor device #
	matches seems perfectly reasonable.
	It's a feature, not a bug, and it doesn't seem to
	be a particularly contrary one either. It doesn't
	hurt anything to rename them - no information is lost,
	due to the aforementioned device #'s which can be
	found by a "ls -l"...

+-----------------------
|Peter Rowell				"He found the missing link!"
|Third Eye Software, Inc.		(415) 321-0967
|Menlo Park, CA  94025			peter@thirdi.UUCP
+-----------------------

Cheers,
-- 
   _  _/\	Bruce Becker	Toronto, Ont.
   \`o O|	Internet: bdb@becker.UUCP, bruce@gpu.utcs.toronto.edu
    \(")/	BitNet:   BECKER@HUMBER.BITNET
---mm-U-mm---	"The OSF is suffering from Penix envy" - Rocky Raccoon

nigel@inmos.co.uk (Nigel Holder) (01/04/89)

In article <1499@tuhold> gfl@tuhold (Gerhard Fleischanderl) writes:
>
>On a dial-in line at a MicroVAX-II (Ultrix 2.0), we encounter
>a strange phenomenon:
>A login on this line (tty03) is not recognized by who(1) nor finger(1).
>However, the login-shell is shown for TTY 03 by ps(1).
>

I suspect there is no entry in /etc/ttys for ttyd0 (the position in /etc/ttys
is used to find a slot in /etc/utmp  -  no entry => no slot !).

Nigel Holder,	 Software Group    |	JANET:	nigel@uk.co.inmos
INMOS Ltd.			   | 	UUCP:	nigel@inmos.co.uk
1000 Aztec West,		   |	(...uunet!mcvax!ukc!logitek!inmos!nigel)
Almondsbury,
Bristol  BS12 4SQ.

Phone:  +44 454 616616 x508

Disclaimer: All views are my own, not those of INMOS.