Skip to main content

sudo

Insudo orderis the standard tool for gaining temporary system administrator privileges on Linux to perform administrative tasks. This eliminates the need to change the current user to root to perform these tasks.

To allow regular users to execute commandcommands with elevated privilegesprivileges, withthe configuration for sudo the sudoers file needs to be edited.modified to allow this.

Opensudo supports configuration drop-in files. Using these makes it easy to modularize the sudoers file with the following commandconfiguration and uncommentremove theoffending linefiles, thatif allowssomething membersgoes of the wheel group to execute any command:wrong.

ATTENTION:WARNING: MakeDrop-in surefiles are just as fragile as /etc/sudoers! It is therefore strongly advised to always edituse thevisudo when creating or editing sudo configurationconfig withfiles, theas visudoit command.will Thischeck wayfor nosyntax othererrors. program can writeFailing to thedo sudoersso will risk rendering sudo inoperable!

Create a new drop-in file while you are editing it.at:

EDITOR=nano visudo /etc/sudoers.d/01_wheel

The contents of the drop-in file are as follows:

## Allow members of group wheel to execute any command
%wheel ALL=(ALL:ALL) ALL

Save and exit.

Now every user who is in the wheel user group is allowed to run any command as root.