Skip to content

Instantly share code, notes, and snippets.

@lpf23
Created April 29, 2014 21:41
Show Gist options
  • Save lpf23/a6c4e69c10a7a3a9bb0d to your computer and use it in GitHub Desktop.
Save lpf23/a6c4e69c10a7a3a9bb0d to your computer and use it in GitHub Desktop.
CentOS & sudo
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