LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   Root Login (https://www.linuxquestions.org/questions/linux-enterprise-47/root-login-4175439294/)

wstewart 12-20-2012 04:49 AM

Interesting. Didn't know that. I had a look at the man page earlier but I didn't see su unless it's just a combination of the s and u options.

wstewart 12-20-2012 04:55 AM

I think I see what you're getting at. sudo su just starts a shell as root and reads the .bashrc or whatever shell you're using but not .profile. I still don't see su in the sudo man page but I'm guessing it's similar to running su just with sudo before it. Either way it's very useful knowledge.

solarisguy 12-20-2012 08:28 PM

Quote:

Originally Posted by wstewart (Post 4853567)
I think I see what you're getting at. sudo su just starts a shell as root and reads the .bashrc or whatever shell you're using but not .profile. I still don't see su in the sudo man page but I'm guessing it's similar to running su just with sudo before it. Either way it's very useful knowledge.

"sudo su -" will also adopt root's environment on successful privilege elevation.


All times are GMT -5. The time now is 09:45 PM.