Subject: Re: "Don't login as root, use the su command."
To: None <current-users@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: current-users
Date: 02/11/2000 17:51:12
In article <cy3ln4r20kp.fsf@verden.pvv.ntnu.no>,
Vebjorn Ljosa <ljosa@initio.no> wrote:
>Bill Studenmund <wrstuden@nas.nasa.gov> writes:
>
>> On Thu, 10 Feb 2000, David Brownlee wrote:
>> 
>> > > Maybe an environment varialbe SU_USER which is set when su su's you. ??
>> > 
>> > 	How about 'SU_FROM'?
>> > 	(I like this idea :)
>> 
>> This would be fine. And it might help auditing too. :-)
>
>hereabout we use $LOGNAME for this purpose, because that's what RCS
>will use.  how about having su set $LOGNAME?

This is not a good idea.
LOGNAME will contain the original user's pw->pw_name as set by /usr/bin/login.
USER will containt the current user's pw->pw_name as set by /usr/bin/su.

If you overwrite LOGNAME you'll lose that information.

christos