Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!cheshire.columbia.edu!francus From: francus@cheshire.columbia.edu (Yoseff Francus) Newsgroups: comp.unix.wizards Subject: Re: Built-in login command (/bin/lo Message-ID: <4705@columbia.UUCP> Date: Thu, 18-Jun-87 10:33:20 EDT Article-I.D.: columbia.4705 Posted: Thu Jun 18 10:33:20 1987 Date-Received: Sun, 21-Jun-87 12:53:01 EDT References: <91@decvax.UUCP> <142700003@tiger.UUCP> Sender: nobody@columbia.UUCP Reply-To: francus@cheshire.columbia.edu.UUCP (Yoseff Francus) Organization: Columbia University CS Department Lines: 34 In article <142700003@tiger.UUCP> rjd@tiger.UUCP writes: > >> Back at U. of NH, I discovered by accident that if >> I ran /bin/login directly (not "exec" it, which the >> builtin shell command "login" does) and logged into >> an account with no password (they had a captive >> account which ran /bin/who), when /bin/login exited >> the entry in the /etc/utmp kept the new login name. >> >> Then (I don't know if it is true anymore) mail used >> to use the /etc/utmp entry (given by: who am i) >> instead of by uid (given by: whoami). > > Interesting, AT&T Sys V, release 2.0 and 3.0 's mail command uses your >LOGNAME variable as a first choice as your ID when sending mail. (Probably >and unimportant bug...) > >rjd Actually the LOGNAME bug was fairly serious. LOGNAME is a shell variable which can normally be changed by a user. A user could chang their LOGNAME variable and then send mail as someone else. On Sys V if you look at /etc/profile you will notice that in many cases after LOGNAME is set it is made into a readonly variable. There are ways around this too, but enough said. yoseff ****************************************************************** yf In Xanadu did Kubla Khan a stately pleasure dome decree But only if the NFL to a franchise would agree.