wp.jochen.hayek.name/blog-en

Linux: how to grant “sudo” privileges to an account: “usermod”

CAVEAT: Do not edit any file for gaining the required effect, instead: use the following command line!

$ sudo usermod --append --groups sudo ACCOUNT

Actually it adds (“–append”) ACCOUNT to a user group by the name of sudo. That works because of this entry in the file /etc/sudoers (what is the group sudo allowed to do?):

%sudo ALL=(ALL:ALL) ALL

In other Linux distributions the group is named administrators instead, that would effect the usermod command line and the entry in /etc/sudoers.

Exit mobile version