The /etc/sudoers file is the configuration files for sudo. These is the file where the users and groups with root priviledges are stored.
Do not edit the /etc/sudoers by hand, use sudo visudo instead. visudo opens the /etc/sudoers file in the default text editor and gives a warning if you type something wrong in the file:
>>> /etc/sudoers: syntax error near line 21 <<<
What now?
Options are:
(e)dit sudoers file again
e(x)it without saving changes to sudoers file
(Q)uit and save changes to sudoers file (DANGER!)
What now?
Root priviledges to a user:
# User privilege specification
razvan ALL=(ALL) ALL
- razvan: the user allowed to use sudo
- ALL: allow sudo from any terminal
- (ALL): all the users can use sudo
- ALL: all the commands can be executed
Root priviledges to a group:
# Members of the admin group may gain root privileges
%geeks ALL=(ALL) ALL
[notice the % before the group name]
- geeks: the group allowed to use sudo
- ALL: allow sudo from any terminal
- (ALL): all the users can use sudo
- ALL: all the commands can be executed