Contents

Linux User Privilege Escalation

Contents

SUDO

1
2
3
sudo visudo
# Or
sudo vi /etc/sudoers
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# User privilege specification
root ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL

# Allow Bob to run any command
mark ALL=(ALL:ALL) ALL

# Allow jake to run any command without sudo password
jake ALL=(ALL) NOPASSWD:ALL

# Allow Sarah to reboot the system
sarah localhost=/usr/bin/shutdown -r now
# See sudoers(5) for more information on "#include"
directives:
#includedir /etc/sudoers.d