Create restricted user on Debian server
        Posted  
        
            by 
                James Willson
            
        on Server Fault
        
        See other posts from Server Fault
        
            or by James Willson
        
        
        
        Published on 2012-09-20T18:54:41Z
        Indexed on 
            2012/09/21
            3:40 UTC
        
        
        Read the original article
        Hit count: 659
        
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
© Server Fault or respective owner