Subject: Re: "Don't login as root, use the su command."
To: David Brownlee <abs@netbsd.org>
From: Andrew Brown <atatat@atatdot.net>
List: current-users
Date: 02/15/2000 17:43:50
> su now sets SU_FROM, which is checked by root's .login in the non
> 'su' case, .login now prints
i'm probably a bit late to butt in here, but what would have been
wrong with having something like this in root's .login file:
if ( `logname` == "root" ) echo "...."
it requires no changes to su or anything else...it just won't quite
work right if /usr isn't mounted. of course...in that case just about
anyone people logging in would *be* root.
i just tested a few things (on 1.3.3, um...btw, does anything have an
account on a -current machine they could lend me for a hour or so?)
and found that:
`logname` $LOGNAME $USER
login root root root
su andrew andrew andrew
su - andrew root root
su -l andrew root root
--
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org * "ah! i see you have the internet
twofsonet@graffiti.com (Andrew Brown) that goes *ping*!"
andrew@crossbar.com * "information is power -- share the wealth."