Table of Contents

Allow a User to use sudo

You can allow a user to use sudo either by adding them to a group which is allowed to sudo, or by specifying the individual user.

Use visudo to edit /etc/sudoers, it uses the system default editor, which is normally vi or vim if it's installed:

[root@machine ~]# visudo

Using Groups

Uncomment the line:

# %wheel        ALL=(ALL)       ALL

Then add your user to the wheel group:

[root@machine ~]# adduser adam wheel

Individual Users

Add a new line which specifies the user:

adam        ALL=(ALL)       ALL

Now the user adam will be able to use the sudo command.