testing out archlinux in a vm by following a tutorial on youtube.. all is fine up until the point where i reboot, boot with the hard disk and enter root at the login screen.

i am trying to add a new user with the useradd function like the guy does in his walkthrough.

I enter:

useradd -m -g users -G lp, scanner, audio, video, optical, storage, network, power, games, wheel -s /bin/bash iKlsR 

upon entering that i get this error

useradd: group `` does not exist

I followed his instructions as closely as possible yet his works and mine doesn't, is the syntax accurate and or there any pitfalls to adding a user this way, im thinking about trying the interactive adduser but im interested in what this does and understanding the switches etc.

  • 1
    What happens when you leave out the spaces in lp, scanner, au.........?
    – jippie
    Commented Dec 26, 2012 at 10:24
  • I don't understand.. ? The above happens.. wait, i will try again and remove the spaces.
    – user29157
    Commented Dec 26, 2012 at 10:26
  • got it, that fixed it!
    – user29157
    Commented Dec 26, 2012 at 10:48
  • indeed, your original command was, for the program: -G lp, which means groups: 'lp','' (and the '' (empty string) group doesn't exist. The rest was not even processed yet, or would have created additionnal errors. Commented Dec 26, 2012 at 16:26

2 Answers 2


just use

useradd -m -g users -G lp,scanner,audio,video,optical,storage,network,power,games,wheel -s /bin/bash iKlsR
  • yh i tried and it worked.. seems rather silly tho..
    – user29157
    Commented Dec 26, 2012 at 10:48
  • see my comment on your original post above for the explanation ^^. Computers or commands are not exactly silly, they do what we ask them to do ;) Commented Dec 26, 2012 at 16:28

You can try to add a new user by typing the command:

useradd -G wheel -s /bin/bash -m "$username" -c "$fullusername"

which is quite often sufficient for the need of a lambda user.

Example: Malory ARCHER client wants to have a userspace on my machine. The command would be:

useradd -G wheel -s /bin/bash -m "malory" -c "Malory ARCHER"

You must log in to answer this question.