Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
What happens when you leave out the spaces in lp, scanner, au.........? –  jippie Dec 26 '12 at 10:24
I don't understand.. ? The above happens.. wait, i will try again and remove the spaces. –  user29157 Dec 26 '12 at 10:26
got it, that fixed it! –  user29157 Dec 26 '12 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. –  Olivier Dulac Dec 26 '12 at 16:26

1 Answer 1

up vote 0 down vote accepted

just use

useradd -m -g users -G lp,scanner,audio,video,optical,storage,network,power,games,wheel -s /bin/bash iKlsR
share|improve this answer
yh i tried and it worked.. seems rather silly tho.. –  user29157 Dec 26 '12 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 ;) –  Olivier Dulac Dec 26 '12 at 16:28

Your Answer


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