Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!husc6!ut-sally!im4u!woton!riddle
From: riddle@woton.UUCP (Prentiss Riddle )
Newsgroups: comp.unix.questions
Subject: Disabling logins under System V
Message-ID: <905@woton.UUCP>
Date: Mon, 13-Jul-87 11:29:44 EDT
Article-I.D.: woton.905
Posted: Mon Jul 13 11:29:44 1987
Date-Received: Wed, 15-Jul-87 03:07:29 EDT
Organization: Shriners Burns Institute, Galveston
Lines: 27
Disabler: "Bob"


I am looking for some advice about the preferred way to temporarily
disable all user logins under System V.  What I want is something
analogous to the BSD "/etc/nologin" file (or is that what it's really
called?  I can't remember): I want to run in multi-user mode but allow
only root to log in.  Furthermore, I want a simple, reversible solution
that can be run by the person who comes in on weekends to do our
backups. 

The first thing that occurs to me is to whip up a shell script to copy
/etc/passwd to a safe place, then substitute a modified version of it
in which an '*' has been inserted in the password field of every login
except for root.  Running the same script with a flag would reverse the
process.  Obviously this script would have to be *highly* reliable. 
Has anyone by any chance written such a script which they know has been
working for some time with no problems? 

Another alternative would be to do the same sort of script, but have it
install an altered version of /etc/inittab instead of /etc/passwd, thus
disabling logins on all lines but /dev/console.  That might be safer, I
guess (or would it be?). 

Am I missing something?  Is there a more straightforward approach?  (We
are running System V Release 2.1.1 Version 1 on a 3B15, if it matters.)

--- Prentiss Riddle ("Aprendiz de todo, maestro de nada.")
--- Opinions expressed are not necessarily those of Shriners Burns Institute.
--- riddle@woton.UUCP  {ihnp4,harvard,seismo}!ut-sally!im4u!woton!riddle