View previous topic :: View next topic |
Author |
Message |
thomasdideriksen n00b

Joined: 21 Jun 2004 Posts: 9 Location: Denmark
|
Posted: Tue Aug 02, 2005 3:21 pm Post subject: whoami and USER disagree |
|
|
After an "emerge --update world --deep" I experience a strange problem:
When I log into my root account using "su", the USER environment variable somehow fails to update:
Code: |
thomas@krakatau64:~> su
Password:
krakatau64 thomas # whoami
root
krakatau64 thomas # echo $USER
thomas
krakatau64 thomas #
|
It is annoying, because the PATH env. variable depends on the USER env. variable... Thus, /sbin is not included in the PATH for the root-user (I know this is a minor issue, but anyway...)
Does anyone know how to solve this matter? |
|
Back to top |
|
 |
msalerno Veteran


Joined: 17 Dec 2002 Posts: 1338 Location: Sweating in South Florida
|
Posted: Tue Aug 02, 2005 3:30 pm Post subject: |
|
|
When doing an "su" use
# su -
man su:
...
The optional argument - may be used to provide an environment similiar to what the user would expect had the user logged in directly.
... |
|
Back to top |
|
 |
thomasdideriksen n00b

Joined: 21 Jun 2004 Posts: 9 Location: Denmark
|
Posted: Tue Aug 02, 2005 3:34 pm Post subject: thanks! |
|
|
Thanks! ... I didn't know that option...  |
|
Back to top |
|
 |
|