Created
April 29, 2014 21:41
-
-
Save lpf23/a6c4e69c10a7a3a9bb0d to your computer and use it in GitHub Desktop.
CentOS & sudo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://wiki.centos.org/TipsAndTricks/BecomingRoot | |
-- su -- | |
su - <user> --> gives identity of <user> along with <user>'s environment | |
su <user> --> gives identity of <user> only | |
su - root --> gives identify ot root along with environment | |
su root --> gives identity of root only | |
su - --> gives identity of root along with environment | |
su --> gives identity of root only | |
-- sudo -- | |
in /etc/sudoers add this line: | |
user ALL=(ALL) ALL | |
sudo -s --> open a root shell | |
sudo -i --> open a root shell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment