watch out when you modify /etc/ttys !!

puder at burdvax.UUCP puder at burdvax.UUCP
Sat Jun 11 02:05:31 AEST 1983


On our 4.1bsd system, we have discovered an interesting phenomenon.

Summary:
If lines are inserted or deleted from /etc/ttys, mail will be sent with the
wrong From username.

Details:

If a line is added to /etc/ttys before the line describing ttyh1,
(signalling init makes no difference to the mail problem) a user on ttyh1
who sends mail will have the name of the user on ttyh2 on the From line.  I
presume that deleting a line would cause the reverse problem.

What seems to be happening is that mail is looking up the terminal name in
/etc/ttys, and then indexing into /etc/utmp to find the user name.  Am I
right?  Why is it done this way?  Why is this not documented ?!?  (And
anyway, why doesn't init rebuild /etc/utmp when it gets the HUP signal?)

Karl Puder   burdvax!puder   SDC-aBC, R & D   Paoli, Pa.   (215)648-7555



More information about the Comp.unix.wizards mailing list