/etc/sudoers
controls who can use the sudo
command and how it is used.
Whenever editing /etc/sudoers
, the visudo
command, which verifies the file before writing, should be used in order to prevent a situation where access to sudo
is blocked.
Add or uncomment the following line if you want sudo
to insult you if you get your password wrong:
Defaults insults
The targetpw command will require that you enter the password of the user that you want to run the command as (typically root).
Defaults targetpw
This is enabled by default on openSUSE. I didn't like this behavior so I disabled it.
The following line will allow any user from the wheel
group to use sudo.
%wheel ALL=(ALL:ALL) ALL
The wheel
group is used by Fedora/openSUSE systems as the group whose members can use sudo. On Debian-based systems, the equivalent group is sudo
.