Adding users to sudoers

If there is a sudo group, you can do the following:

$sudo adduser <username> sudo

This works because /etc/sudoers is pre-configured to grant permissions to all members of this group (You should not have to make any changes to this):
# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

Otherwise, you can add the user directly

$nano /etc/sudoers

add the following to the end of the file, and save:
username ALL=(ALL) ALL

Leave a Reply