Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!husc6!ut-sally!seismo!mimsy!chris From: chris@mimsy.UUCP Newsgroups: comp.unix.questions Subject: Re: login(1) and /etc/ttys Message-ID: <5300@mimsy.UUCP> Date: Thu, 5-Feb-87 11:07:00 EST Article-I.D.: mimsy.5300 Posted: Thu Feb 5 11:07:00 1987 Date-Received: Sat, 7-Feb-87 16:13:08 EST References: <4250@brl-adm.ARPA> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 17 In article <4250@brl-adm.ARPA> escott%deis.uci.edu@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@mimsy.umd.edu