I added a user named "admin" to my Ubuntu 14.04LTS server, using adduser
.
I'm used to having to add a user to the /etc/sudoers
file when adding a new user that needs sudo privileges, but this time I didn't. It doesn't appear the 'admin' user existed before I created it, based on the output in the shell. Why did this work this way?
Best Answer
By default
adduser
adds every new user to a group with the same name as the user's (the group is created if it doesn't already exists). So if you create a user calledadmin
it will be added to the groupadmin
./etc/sudoers
contains the linewhich means that all members of the group
admin
are allowed to usesudo
- and that's true for youradmin
user, too.