add user to sudoers group on Ubuntu [closed]

0

How to create a user and put it in the list of sudoers in linux? How to get an existing user and change your group to sudoer?

    
asked by anonymous 28.10.2014 / 22:28

1 answer

2

I tried to find it here in SOPT and I did not find it, I even searched SOEN but I found a more complete answer on askubuntu, so I'll put here what I did to solve, if the question is duplicated please let me know by comment which I delete if that is the case.

To add a new user just replace the one with your user name:

sudo adduser <username> sudo

If you want to add an existing user to the sudo group just do:

sudo usermod -aG sudo <username>

The "a" is important so that the user does not leave the other groups, since "G" refers to the group where you are placing your user.

Then just log out and log in again for the changes to take effect.

More references in: link

    
28.10.2014 / 22:28