Ubuntu – Problem with adduser on new install

addusersudo

I am a noob trying to get an install of ubuntu 14.04 LTS up and running on a virtual server on linode. I have not done much on it yet. Earlier today I tried to add some users. I was able to add one non-admin test user just fine. I used the command

adduser testuser

I then wanted to add a test user with admin privileges. I used the command

adduser testadminuser sudo

did not work. comes back with the error

adduser: the user testadminuser does not exist. 

It almost looks like no sudo groups exist. I used a canned load by the hosting site: I would think it is set up for adding an admin user. I think it is a user error, but am stymied.

I did look at /etc/groups, and there is no sudo group.

Help!

Best Answer

The syntax:

adduser <username> <group> 

is for adding an existing user to an existing group. So you will have to create the testadminuser before adding to any group:

adduser testadminuser
adduser testadminuser sudo

You can use the usermod command to combine both steps, but that is a bit more involved.

Related Question