In /etc/sudoers
, there is always:
root ALL=(ALL:ALL) ALL
However, the root user (with UID 0) doesn't need to enter password when they run sudo command
.
For other users, a password is required unless their entry contains NOPASSWD
or a previous authentication hasn't timed out:
user ALL=(ALL:ALL) NOPASSWD:ALL
^^^^^^^^
sudo
to run commands as UID 0, and root is already UID 0 and there's nothing to gain by stopping them,sudo
still requires the config line forroot
to be there. Without it, it tells even root to bugger off. – ilkkachu Mar 25 '19 at 10:37root
. What would you gain runningsudo
as root? "Beyond Root"? "Who watch the Watchmen?" – Mar 25 '19 at 14:28