how to change 'su' path
How do you change the PATH you get when you type just 'su' (not 'su -').
I've tried /etc/profile and /etc/rc.d/rc.K , and neither work. Seems simple, but I can't find the answer anywhere. Dana |
`man su`
<snip> The current environment is passed to the new shell. The value of $PATH is reset to /bin:/usr/bin for normal users, or /sbin:/bin:/usr/sbin:/usr/bin for the super user. This may be changed with the ENV_PATH and ENV_SUPATH definitions in /etc/login.defs. |
do you mean the actual PATH, or the directory you are in when you su to root?
|
Are you talking about adding something to the default PATH environment, or change the default itself?
Adding to the default can be done by editing (creating) /root/.bashrc. The default PATH environments are set in /etc/login.defs. I would suggest not changing these, unless you realy know what you are doing. Hope this helps. |
/etc/login.defs worked
Thanks |
All times are GMT -5. The time now is 02:29 PM. |