Got an error today I have never seen before (shocker) while trying to set up something on Debian Lenny. Took a while to find the culprit, but when I did it was so annoying, decided to share it here in case it saves headache to somebody else.

So, I was just trying to run a seemingly innocent command:

sudo /usr/sbin/adduser —-system —-home /opt/otherhome/someuser —-no-create-home —-shell /bin/bash  —-gecos “FirstName Lastname” someuser

Debian was freaking out with a violent: “adduser: Only one or two names allowed.” error. Google search on the error returned a lot of hits, but alas none of them helpful. Basically, people bailing and just creating a regular user instead of a system one.

So, after some head-banging and giving up on Google, I noticed that the answer had been right under my nose all along: command is correct but characters are not! If you look closely you can notice that dashes and quotes are typographical ones, not the usual geek ones you would use if you typed the command yourself. Unfortunately, the difference is almost impossible to tell in most terminal programs.

Fix: change dashed and quotes to appropriate characters or retype the command entirely.

So there’s something to be said about me copy/pasting code from a Github gist page and trusting it would just work and for people who typographically alter code snippets :)

#sigh