Xref: utzoo comp.unix.admin:135 comp.unix.shell:194 Path: utzoo!attcan!uunet!unhd!unhtel!paul From: paul@unhtel.uucp (Paul S. Sawyer) Newsgroups: comp.unix.admin,comp.unix.shell Subject: Re: Logging a User Off Summary: Use password aging feature Message-ID: <1990Sep14.231707.8184@unhtel.uucp> Date: 14 Sep 90 23:17:07 GMT References: <1990Sep11.173008.274@mccc.uucp> Organization: UNH Telecommunications and Network Services Lines: 23 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 >password field of /etc/passwd for the user logging in and runs the >passwd program if the password field is empty. > >However, I would like to be able to terminate the login process if that >user fails to select a password. I though I would examine the return >code of the passwd command and then exit if it's not 0. BUT, simply >executing "exit" doesn't abort the login; it aborts /etc/profile! What >can I execute to terminate the login of a user who fails to select a >valid password? If you set the password field to ',..' (comma-dot-dot) login should make the user set the password before continuing. This sounds like what you want, unless I'm missing something. Good luck. -- Paul S. Sawyer uunet!unh!unhtel!paul paul@unhtel.UUCP UNH Telecommunications attmail!psawyer p_sawyer@UNHH.BITNET Durham, NH 03824-3523 VOX: +1 603 862 3262 FAX: +1 603 862 2030