deceptive mail

Dave Martindale dmmartindale at watcgl.UUCP
Wed Nov 21 04:58:57 AEST 1984


> 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.



More information about the Comp.unix.wizards mailing list