Problem with adduser on new install

15,648

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.

Share:
15,648

Related videos on Youtube

J-Logger
Author by

J-Logger

old noob. Used ubuntu briefly back in release 7, 9, ??? now trying to get up to speed again.

Updated on September 18, 2022

Comments

  • J-Logger
    J-Logger over 1 year

    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!

    • muru
      muru over 9 years
      Is there a wheel or admin group present? You can see which group has admin privileges by looking at /etc/sudoers.
  • grantbow
    grantbow over 9 years
    Thanks @muru for this precise answer. Also after reading your suggestion, looking in /etc/sudoers on my 12.04 system the default group "admin" is for gaining root privileges while the default group "sudo" is more powerful and can execute any command. It should be similar on 14.04 and can easily be checked.
  • J-Logger
    J-Logger over 9 years
    Thanks to both of you (muru, grantbownam) for your answers. You helped a noob get to the next step.
  • muru
    muru over 9 years
    @J-Logger if the answer solved the problem, you can accept it by clicking on the tick next to it.
  • J-Logger
    J-Logger over 9 years
    thanks agian... just did that. says 1 answer, but has not changed it to green... ???
  • muru
    muru over 9 years
    @J-Logger that's fine. Might be some temporary bug. :)
  • David
    David about 2 years
    Hello. There is not such Linux distro as Debian Ubuntu. You have run the name of 2 different distros together.