|
|
Create a superuser shell without enabling root
I've always used 'sudo su' to accomplish this; is there any effective difference?
Create a superuser shell without enabling root
Good tip! I just tried out sudo su and it works perfectly. I'm really surprised I have yet to see this before. It will certainly save me a bunch of time. I get so tired of having to type sudo before each command.
Create a superuser shell without enabling root
I would do a 'sudo su -' tho to gain the full root account (not just becoming root) - make sure of the space between 'su' and the '-'.
Create a superuser shell without enabling root
Its all in the password
The main difference is in which password you get prompted for. The su command authenticates with the password of the user you are switching to while sudo authenticates with your password. Further, if su is invoked by the root account, then it needs no password.
Thus, what is happening is that sudo prompts you for your password, and then switches you to root and invokes su to create a root shell without prompting for a root password.
You end up in different directories
The command "sudo -s" starts a root shell but leaves you in the same directory from which you invoked it. The command "sudo su -" logs you into a root shell in root's home directory (/var/root/). Since I am often already in the directory I want to modify, I like "sudo -s." |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.38 seconds |
|