Path: utzoo!attcan!uunet!snorkelwacker!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!haven!sayshell.umd.edu!louie From: louie@sayshell.umd.edu (Louis A. Mamakos) Newsgroups: comp.unix.wizards Subject: Re: time dependent login Message-ID: <1990Jun2.033752.20416@haven.umd.edu> Date: 2 Jun 90 03:37:52 GMT References: <979@sixhub.UUCP> <1990May28.200520.20288@cbnews.att.com> <1990May29.194446.12623@cbnewsh.att.com> <1990May31.172936.10030@cbnews.att.com> Sender: usenet@haven.umd.edu (USENET News Posting) Distribution: na Organization: The University of Maryland, College Park Lines: 14 In article <1990May31.172936.10030@cbnews.att.com> res@cbnews.att.com (Robert E. Stampfli) writes: > >Why *not* modify the password file? To turn an account "xyz" off: >/bin/echo '/^xyz:/s/:/:NOLOG/\nw' | /bin/ed /etc/passwd What happens if someone else is trying to modify the password file (changing their password, adding a user, etc)? Someone's going to lose. You'll have to obey whatever locking convention is used on your particular platform to arbitrate access to /etc/passwd to make this work reliably. louie