What are the differences between "sudo -s" and "su root"? As they both can provide root permission.
Asked
Active
Viewed 1,027 times
1 Answers
2
There are a bunch of differences, the main one being that sudo -s
relies on the user having sudoer privileges whereas su root
requires the user to have the root password.
As a side-note
From a security perspective, it is much better to assign users sudoer privileges to access the root shell rather than passing around a root password that users can use through su root
. If a user has the root password, they can obtain root anytime. If they are assigned privileges through /etc/sudoers
, then access to the root shell can be revoked at anytime.