Create restricted user on Debian server
- by James Willson
I want to create a user account for each of the key programs installed on my debian server. For example, for the following programs:
Tomcat Nginx Supervisor PostgreSQL
This seems to be recommended based on my reading online. However, I want to restrict these user accounts as much as possible, so that they dont have a shell login, dont have access to the other programs and are as limited as possible but still functional.
Would anyone mind telling me how this could be achieved? My reading so far suggests this:
echo "/usr/sbin/nologin" >> /etc/shells
useradd -s /usr/sbin/nologin tomcat
But I think there may be a more complete way of doing it.
EDIT: I'm using debian squeeze