Logging a User Off

Mark Sicignano mark at hsi.UUCP
Wed Sep 12 11:26:44 AEST 1990


In article <1990Sep11.173008.274 at mccc.uucp> pjh at 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 at hsi.com
--



More information about the Comp.unix.admin mailing list