Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

In order to automatically create domains/subdomains I need to add the user. ex.

useradd -gpsacln -p$1$salt1234$bTARrDtiFtJF9wDZzDFx00 -M demodelete

The user is added without problem. BUT the home directory is still being created. I won't use the home/directory for any of the site files so I prefer they are not generated automatically.

What am I doing wrong?

share|improve this question

migrated from Nov 6 '11 at 9:12

This question came from our site for professional and enthusiast programmers.

Try it without the -M, according to the man page -m tells useradd to create the home directory, and there is no option for -M. Which distro are you running? – d34dh0r53 Nov 6 '11 at 9:23

I suspect it's because you didn't quote the password field, so part of that is being interpreted as shell variables (i.e. $1, $s, $b), which are introducing spaces and breaking your command line.

Try quoting the value of the -p option:

useradd -gpsacln -p'$1$salt1234$bTARrDtiFtJF9wDZzDFx00' -M demodelete

Be sure to use single quotes, not double quotes, since shell variables are still interpolated within double quotes.

share|improve this answer

Your Answer


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