Linux System is much secured than any of its counterpart. One of the way to implement security in Linux is the user management policy and user permission and normal users are not authorized to perform any system operations.
If a normal user needs to perform any system wide changes he needs to use either ‘su‘ or ‘sudo‘ command.
NOTE – This article is more applicable to Ubuntu based distributions, but also applicable to most of the popular Linux distributions.
‘su’ Vs ‘sudo’
‘su‘ forces you to share your root password to other users whereas ‘sudo‘ makes it possible to execute system commands without root password. ‘sudo‘ lets you use your own password to execute system commands i.e., delegates system responsibility without root password.
What is ‘sudo’?
‘sudo‘ is a root binary setuid, which executes root commands on behalf of authorized users and the users need to enter their own password to execute system command followed by ‘sudo‘.
Who can execute ‘sudo’?
We can run ‘/usr/sbin/visudo‘ to add/remove the list of users who can execute ‘sudo‘.
A screen shot of ‘/usr/sbin/visudo‘ file, looks something like this:
The sudo list looks like the below string, by default:
Note: You must be root to edit /usr/sbin/visudo file.
No comments:
Post a Comment