login(1) and /etc/ttys
chris at mimsy.UUCP
chris at mimsy.UUCP
Fri Feb 6 02:07:00 AEST 1987
In article <4250 at brl-adm.ARPA> escott%deis.uci.edu at icsg.UCI.EDU
(Scott Menter) writes:
>Excuse me if this is obvious, but why is it that when there is no entry in
>"/etc/ttys" for the terminal device you are logging in to, no record is made
>of your login in "/etc/utmp"?
login and init must agree on which entry to write. They do this
by using ttyslot() to compute an offset. ttyslot() returns
(essentially) the line number of the line in /etc/ttys containing
that tty name, or an error value if no slot is found.
Incidentally, this means that if you insert a line in /etc/ttys,
utmp will be scrambled. It is therefore best to do this only in
single user mode. Appending new entries, however, is safe.
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690)
UUCP: seismo!mimsy!chris ARPA/CSNet: chris at mimsy.umd.edu
More information about the Comp.unix.questions
mailing list