Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm want to use adduser However it doesn't seem to work if I provide the second argument for the user's group

root@a:~# adduser rick staff
adduser: The user `rick' does not exist.

The group exists

root@a:~# addgroup staff
addgroup: The group `staff' already exists.

The man page says this should work...

adduser [options] user group

Any ideas?

I can do:

adduser --ingroup staff rick

So no massive issue, just seems strange.

share|improve this question
Could you pastebin man adduser? Seems odd... – PriceChild Nov 11 '11 at 16:38
up vote 2 down vote accepted

Rob, re-read the error message from adduser command: The user rick does not exist.. Later you write about group staff, which does exist. But adduser failed because user rick does not exist yet.

I'd comment and not answer, but have not enough reputation.

share|improve this answer
you're right, my bad, it's not clear from the man page but what im trying to run requires an existing user, so using --ingroup is what I want. – Rob Nov 14 '11 at 11:02

If you are trying to add an user and add this user to a group, you should:

adduser newuser
usermod -aG thegroup newuser

If thegroup isn't yet created, you should create it before the usermod:

groupadd thegroup
share|improve this answer
Thanks for the answer but I know how, im asking why the documented method of adduser does not work – Rob Nov 11 '11 at 17:24
@Rob perhaps you are lookin for --gid or --ingroup ? – ata Nov 11 '11 at 18:27
As per my original question, --ingroup works fine, this is nothing to do with groups, I'm trying to raise that there's an issue with adduser [options] user group – Rob Nov 14 '11 at 10:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.