Creating Privileged Roles Using sudo

  • By adding users to sudoers file, we specify which command they are allowed to use, without knowing root password.
  • Who can do what is defined in /etc/sudoers file.
  • Sudo stores all entries inside its log files.




Steps for adding roles to sudoers file:

# visudo
# Add line above

  • We can add users using sudo command ($ sudo useradd test1)
  • Sudo does not ask for password again, for the next 5 minutes.