I want to create a user in the FreeBSD for
nginx that has:
- No Login.
- No home directory
how should I do that with
pw useradd or any other tool.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
It must have a home directory listed in
/etc/passwd. Usually that will be whatever directory you store the web pages / config files in, though if you want to make sure it's a directory that doesn't exist,
/nonexistent can be used instead.
To create a user that is not allowed to login, you would do two things:
This is how you do it:
useradd -c "Nginx server account" -d /path/to/directory -s /usr/sbin/nologin -w no nginx