# su does not update path
when I 'su' to root, the $PATH is not set . How to fix this ?
$ su // $PATH is unset Password: # echo $PATH /sbin:/bin:/usr/sbin:/usr/bin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin # su - // $PATH is set fine here # echo $PATH /usr1/bin:/opt/Software/Multimedia/RealPlayer:/opt/Software/Development/Java/jsk/bin:/root/bin:/sbin:/usr/sbin:/usr/local/sbin/:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/root/kde3.2.3/bin |
What do you want to fix, it's running perfectly:
"su" = change only the user, without a name it's root "su -" = change user and load his environment, without a name it's root |
when doing just 'su' , it should inherit the user's environments and variables - correct ?
|
Yes, but I wouldn't say inherit, just "su" changes nothing except the username and allow you doing things in his name with his permissions.
|
All times are GMT -5. The time now is 10:10 PM. |