Xref: utzoo comp.unix.admin:85 comp.unix.shell:115 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!mp.cs.niu.edu!rickert From: rickert@mp.cs.niu.edu (Neil Rickert) Newsgroups: comp.unix.admin,comp.unix.shell Subject: Re: Logging a User Off Message-ID: <1990Sep11.201345.18277@mp.cs.niu.edu> Date: 11 Sep 90 20:13:45 GMT References: <1990Sep11.173008.274@mccc.uucp> Organization: Northern Illinois University Lines: 34 In article <1990Sep11.173008.274@mccc.uucp> pjh@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. /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. A practical application is to set up new student accounts with no password, the restricted shell, a non-empty SUSPEND owned by the course instructor, and the home directory not publically readable. When the student establishes a password the directory is made readable. That allows the instructor to validate the account by copying /dev/null to SUSPEND. At the next login the .profile detects this, changes the shell etc. -- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= Neil W. Rickert, Computer Science Northern Illinois Univ. DeKalb, IL 60115. +1-815-753-6940