A root user can have all the privileges. But a normal user can gain access like a root with su or sudo command and their own password.
So what's the difference?
|
A root user can have all the privileges. But a normal user can gain access like a root with su or sudo command and their own password. So what's the difference?
| ||||
|
feedback
|
This question came from our site for professional and enthusiast programmers.
|
A normal user can only gain root access with sudo if they are in the sudoers file (meaning they are trusted enough to gain admin permissions on demand). In a production environment, almost nobody should be a sudoer. | |||
|
feedback
|
|
The Modern Linux distributions preconfigure the first user to be able to sudo with her own password. This prevents accidental system malconfiguration by the user, and enables them to gain full control without the need of a separate root password. | |||||
feedback
|
|
Not all normal users can use sudo, they have to be in the sudoers file and you can control which commands or types of commands the user can execute. Also, only certain users can use su to switch to the root user. Normally you would only have sudo permissions for a limited set of commands and full su permissions for a limited period of time. | |||||||
feedback
|
|
The The | |||
|
feedback
|
|
To add to the above answers,
| |||
|
feedback
|
|
Only users with super-user privileges can sudo or su, normal users cannot. This is configured in /etc/sudoers, which should always be edited with visudo. The benefits of this system are:
| |||
|
feedback
|