Preventing users from loggin into a unix box

From: Pete Turnbull <pete_at_dunnington.u-net.com>
Date: Fri Apr 20 02:53:20 2001

On Apr 19, 17:50, Ram Meenakshisundaram wrote:
> Gene Buckle wrote:
>
> > do a touch /etc/nologin

> This wont work as nologin is just a message file (similar to motd)
whenever the system is about to shutdown.

That's not what it's "supposed" to do -- it's supposed to be checked by
'login' and if it exists, cause login to refuse to accept the remote login,
and print the contents (if any).

Some versions of Solaris don't honour that, though :-( They just use it
to contain a message given to anyone attemting to log in while a shutdwon
is in progress (it's not the message printed to active sessions when a
shutdown starts, though).

If your system uses NIS, then you could just change the contents of the
passwd line in /etc/nsswitch.conf from "passwd: files nis" to "passwd:
files" and add your own entry to /etc/passwd and /etc/shadow.

-- 
Pete						Peter Turnbull
						Network Manager
						Dept. of Computer Science
						University of York
Received on Fri Apr 20 2001 - 02:53:20 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:33:27 BST