Ubuntu – Do users created from System settings > user accounts not appear in sudoers

administratorprivilegesusers

I'm running Ubuntu 15.10 on different machines.

On one of those I had to create a new user from command line (adduser) and then I added it to /etc/sudoers to give admin authorizations to that user.

Later, on another machine, I created a new admin user from System settings → user accounts, but when I check in the /etc/sudoers file, I don't find any entry for the admin user.

Why does it happen? Are users created through graphical interface listed in a different way in different files? If that is the case, what are files with the entries of new admin user created?

Best Answer

You don't add a user to the /etc/sudoers file to grant him to use sudo to become root, but you just add him to the sudo and adm groups:

sudo adduser USERNAME sudo
sudo adduser USERNAME adm

This is also what the GUI does when you select "Administrator" as account type.