Problem with adduser on new install
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 videos on Youtube
J-Logger
old noob. Used ubuntu briefly back in release 7, 9, ??? now trying to get up to speed again.
Updated on September 18, 2022Comments
-
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 nosudo
group.Help!
-
muru over 9 yearsIs there a
wheel
oradmin
group present? You can see which group has admin privileges by looking at/etc/sudoers
.
-
-
grantbow over 9 yearsThanks @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 over 9 yearsThanks to both of you (muru, grantbownam) for your answers. You helped a noob get to the next step.
-
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 over 9 yearsthanks agian... just did that. says 1 answer, but has not changed it to green... ???
-
muru over 9 years@J-Logger that's fine. Might be some temporary bug. :)
-
David about 2 yearsHello. There is not such Linux distro as Debian Ubuntu. You have run the name of 2 different distros together.