Published on (  See this if you're having trouble printing code
examples  Big Scary Daemons  Controlling User Logins   Some
servers have hundreds of users, each with different purposes. If
you want to assign different privileges to each, how do you do
it? FreeBSD includes a few different ways to control user
access. The /sbin/nologin program is useful for limited
accounts. More general control is handled by /etc/login.access.
One of the most common cases you'll find is when an
administrator wishes to allow a single user FTP access, but not
shell access. If this is an isolated case, it's most simply
accomplished with /sbin/nologin. All you have to do is add
/sbin/nologin to /etc/shells, so ftpd will accept the
connections on that user ID.  When a user has a shell of
/sbin/nologin, their telnet and SSH requests are met with:
login: loserusername Last login: Tue Mar 27 20:33:59 from
localhost   The Regents of the University of California. All
rights reserved.  FreeBSD 5.0-CURRENT (TURTLEDAWN) #3: Wed Mar
28 14