Question: I want to `su - nginx` so I can check if I have set up soft and hard limit for opened files correctly.

Why can't I `su - nginx`? I get an error `*No passwd entry for user 'nginx'*`

---

**EDIT:**

Of course the user was www-data not nginx...
When I do `su - www-data` I get This account is currently not available.

Basically what my question is, I want to see limits for opened files. If I do `ulimit -n` under root, I get 1024, which I know is wrong...

Answer: 
Nginx is has a system user that have no ability to login, because the shell is /sbin/nologin (or even /bin/false) so you can just SU to it. Uou need to instruct the su command which shell to execute for us.

```
su nginx -s /bin/bash
ulimit -n

```
If you want to check limit for user `www-data` without editing `/etc/passwd` you can simple run following command:

`su www-data -c 'ulimit -n' -s '/bin/bash'`

```
Options:
  -c, --command COMMAND         pass COMMAND to the invoked shell
  -, -l, --login                make the shell a login shell
  -s, --shell SHELL             use SHELL instead of the default in passwd

```