Logging a User Off
Pete Holsberg
pjh at mccc.uucp
Sat Sep 15 10:17:05 AEST 1990
In article <1990Sep11.201345.18277 at mp.cs.niu.edu> rickert at mp.cs.niu.edu (Neil Rickert) writes:
=In article <1990Sep11.173008.274 at mccc.uucp> pjh at mccc.uucp (Pete Holsberg) writes:
=>For reasons that are beyond the scope of this question, all new logins
=>on one of my systems (3B2.400 SVR3.1) get no initial password. I've
=>written a little script that I put into /etc/profile. It examines the
=
= The way I handle new accounts is as follows:
=
= The initial shell is the restricted shell. (Actually the restricted
=kshell, or to be more precise a local front end which just execs to the
=restricted kshell.
My Korn Shell (from Aspen) doesn't mention a restricted ksh.
= /etc/profile detects the restricted shell (the $SHELL variable), and
=sets a path with a very minimal set of commands. In this case 'passwd'
=is a shell script which invokes the real passwd command, and then check
=for a changed password.
=
= If the password is changed, and if there is not non-empty file named
=SUSPEND in the users home directory, then the shell script invokes
='chsh' to provide a decent shell, copies standard startup files to the
=home directory if they are not present, and recommends that the user
=logout then login again.
Not a bad idea. However, I got many suggestions on logging people off
and one or two about just setting up a loop whereby the user was forced
to enter a password, no matter what. I did the former on the dial-up
machine and the latter on the "terminal" one.
My thanks to all who responded.
Pete
--
Prof. Peter J. Holsberg Mercer County Community College
Voice: 609-586-4800 Engineering Technology, Computers and Math
UUCP:...!princeton!mccc!pjh 1200 Old Trenton Road, Trenton, NJ 08690
Internet: pjh at mccc.edu Trenton Computer Festival -- 4/20-21/91
More information about the Comp.unix.shell
mailing list