Xref: utzoo comp.unix.admin:89 comp.unix.shell:125 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!uunet!hsi!mark From: mark@hsi.UUCP (Mark Sicignano) Newsgroups: comp.unix.admin,comp.unix.shell Subject: Re: Logging a User Off Message-ID: <2036@hsi86.hsi.UUCP> Date: 12 Sep 90 01:26:44 GMT References: <1990Sep11.173008.274@mccc.uucp> Reply-To: mark@hsi.com (Mark Sicignano) Organization: 3M Health Information Systems, Wallingford, CT. Lines: 26 In article <1990Sep11.173008.274@mccc.uucp> pjh@mccc.uucp (Pete Holsberg) writes: >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? > Assuming that you have a script called chkpasswd that you call from your .login or .profile (or /etc/profile, whatever) and chkpasswd exits with 0 on success or something else on failure, that can't you test the return value from chkpasswd and based on that do a kill -1 $$ ? $$ is the pid of the current shell. -mark -- Mark Sicignano ...!uunet!hsi!mark 3M Health Information Systems mark@hsi.com --