I added a user to sudo , but I don't see that user in /etc/sudoers
I set up my server on Ubuntu 16.04 LTS, and after creating a user and adding sudo privileges to that user, I checked the following file to see user permissions:
$ cat /etc/sudoers
The user that I created is not listed in the sudoers file. How can I check what groups that my user is in?
1 Reply
Adding a user to sudo doesn't directly add the user in the file /etc/sudoers. Usually if you check the end of the sudoers file, you will see the output dividing users and groups. Adding the user to sudo will just add the user to the sudo group, not add the users name to /etc/sudoers. You can verify what groups a user is in by running the following command:
$ groups myuser
This will output the groups that myuser is in. If you see sudo listed as a group, the user is able to run sudo.