On Tue, 26 Mar 2002 04:52:26 +1100
Ron Stodden <[EMAIL PROTECTED]> wrote:

> What seems like another problem with 8.2 ...
> 
> Security is standard.
> 
> If I log in as user 'ron'. as is usual, and do:
> 
> users
> 
> I get:
> 
> ron
> 
> which is OK.  If I now su to root, users does not change.  It used to
> say:
> 
> ron root
> 
> if I now say:
> 
> whoami
> 
> I get:
> 
> root
> 
> which is correct.
> 
> If I now run a script, $USER delivers "ron", not the "root" which
> previous Mandrakes delivered.
> 
> So just exactly what is going on, please?
> 
> Question: How do I get the current real user name from inside a bash
> script?
 
It seems to me to be now operating as it should.

If I login as Charles and su to root, I did not login as root only
acquired root privileges as user Charles so entering 'user' should display only 
Charles.
whoami delivers root since those are the permissions I am given.

I could be off base in my conclusion but it seems right.

If you wish to operate in a different manner, in a shell 'info su'.
You should be able to find the information there. 


   Charles

Reply via email to