LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I retain the PATH in the root account even when I switch to root using su? (http://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-retain-the-path-in-the-root-account-even-when-i-switch-to-root-using-su-352741/)

thearchitect 08-13-2005 12:59 AM

How do I retain the PATH in the root account even when I switch to root using su?
 
Last night, I switched to root from my other login using the su command. I discovered that I could issue certain commands - hdparm, shutdown, etc. in this mode. Then, I found out that /sbin was not in the PATH. But, when I logged in to root, /sbin was there in the PATH. How do I make sure that /sbin is exported to the PATH even when I switch to root using su.

Linux~Powered 08-13-2005 01:02 AM

Code:

su -


All times are GMT -5. The time now is 01:57 AM.