Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site watcgl.UUCP Path: utzoo!watmath!watcgl!dmmartindale From: dmmartindale@watcgl.UUCP (Dave Martindale) Newsgroups: net.unix-wizards Subject: Re: deceptive mail Message-ID: <511@watcgl.UUCP> Date: Tue, 20-Nov-84 13:58:57 EST Article-I.D.: watcgl.511 Posted: Tue Nov 20 13:58:57 1984 Date-Received: Wed, 21-Nov-84 00:04:36 EST References: <331@uvm-cs.UUCP> <45@uwvax.UUCP>, <221@turing.UUCP> <4632@utzoo.UUCP> <225@turing.UUCP> Organization: U of Waterloo, Ontario Lines: 24 > Well, perhaps. I do not see the possibility of a recursive login as > something that is broken and should be fixed, in fact I use it almost daily. > > My only point was to warn you that the value returned by getlogin() is > not always reliable. > > There is a difference between (login x) and su x : in the first case > you get into the home directory of x, his .profile or .login is executed etc.; > in the second case your working directory remains unchanged and your > environment is unchanged except for SHELL and HOME. I need the former kind > of behaviour, but can well imagine that other people prefer the latter. > Andries Brouwer -- CWI, Amsterdam -- {philabs,decvax}!mcvax!aeb But "login" is intended to "log you in", replacing the previous user of that terminal. If you really want to get the home directory of x, his .profile executed, but all in a nested shell like "su" provides, you should either modify "su" to allow that behaviour as an option, or write a command of a different name to do it. Just because a nested login provides some useful facilities doesn't mean that the ability to do them is a feature instead of a bug. If you want those facilities, provide them in a way that doesn't also create the problems.