Subject: Re: "Don't login as root, use the su command."
To: None <firstname.lastname@example.org>
From: Christos Zoulas <email@example.com>
Date: 02/11/2000 17:51:12
In article <firstname.lastname@example.org>,
Vebjorn Ljosa <email@example.com> wrote:
>Bill Studenmund <firstname.lastname@example.org> 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.