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

Im just installed nginx from source

but when run /etc/init.d/php_cgi start, there is a message:
Starting php-cgi: spawn-fcgi: can't find user name nginx more I dont know about their permission.

previously I install nginx using yum (CentOS)

share|improve this question

This will create the user and set their shell to /bin/false so no one can start an interactive login as this user.

$ useradd -s /bin/false nginx
share|improve this answer
can you tell me why /bin/false? what is /bin/false? my previous server also shell to /bin/false but I have no idea about it – kakals1 Oct 14 '10 at 13:38
/bin/false exists for one purpose - to provide a non-zero exit code. Contrast this with /bin/true, which always provides a zero exit code. The effect this has with regards to user accounts is that the user doesn't have a valid shell. – EEAA Oct 14 '10 at 13:50


$ sudo adduser --system --no-create-home --user-group --disabled-login --disabled-password nginx


$ sudo adduser --system --no-create-home --user-group -s /sbin/nologin nginx
share|improve this answer
I get Option s is ambiguous (shell, system) (probably you want use shell) – shakaran Jan 14 '15 at 3:41
I think you don't need --disabled-password when using --disabled-login. According to the documentation: --disabled-login - Do not run passwd to set the password. The user won't be able to use her account until the password is set. --disabled-password - Like --disabled-login, but logins are still possible (for example using SSH RSA keys) but not using password authentication. – czerasz Apr 8 '15 at 10:40

On Ubuntu you can use this command:

adduser --system --no-create-home --shell /bin/false --group --disabled-login nginx
share|improve this answer

Your Answer


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