Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!mit-eddie!uw-beaver!ubc-cs!alberta!oha!tony From: tony@oha.UUCP (Tony Olekshy) Newsgroups: comp.unix.questions Subject: Re: loginid vs. uid. Message-ID: <441@oha.UUCP> Date: 20 Jul 90 23:09:09 GMT References: <232@twg.wimsey.bc.ca> <11399@hydra.gatech.EDU> <234@twg.wimsey.bc.ca> <2793@wyse.wyse.com> Organization: Olekshy Hoover & Associates Ltd., Edmonton, Alberta, Canada. Lines: 24 In-Reply-To: Message <2793@wyse.wyse.com> dated 18 Jul 90 00:44:18 GMT In message <2793@wyse.wyse.com>, bob@wyse.wyse.com (Bob McGowen x4312 dept208) writes (about $LOGNAME): > > Consider the name of the variable. It should point to your login name > regardless of whom you su to or how you su, I would think. Just like a > 'who am i' looks in /etc/utmp (I believe) and gets your login name even > if you are su'ed to another user. This seems like proper behavior to me. Beg to differ, but the Xenix manual page explicity says: SU(C) XENIX System V SU(C) If the first argument to su is a -, the environment is changed to what would be expected if the user actually logged in as the specified user. So, if we set up two terminals, and you `su - foo` and I "login: foo", then what am I to *expect* $LOGNAME to be in each case? -- Yours etc., Tony Olekshy. Internet: tony%oha@CS.UAlberta.CA BITNET: tony%oha.uucp@UALTAMTS.BITNET uucp: alberta!oha!tony