What is Sudo?
- "sudo" stands for "Superuser Do."
- It is a command to execute commands with elevated privileges or as the superuser.
Benefits
- Enables authorized users to execute administrative commands temporarily without logging in as root.
- It offers access control through configuration in the sudoers file
- specifying allowed users or groups and their privileges.
- "Sudo" usage is logged for monitoring and auditing privileged command execution, aiding in security maintenance.
sudoers
- Only sudoers can install/upgrade/remove packages
- To view the sudoers file, the user must be listed in it
- We can view the
sudoers file by typing sudo cat /etc/sudoers
- This will ask for the user password
- it will either display the file or
- show an error like
user is not in the sudoers file. *This incident will be reported*.
How can a superuser find out the failed sudo attempt by non-sudo?