> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Steve Ferries
> Sent: Monday, July 10, 2006 10:40 AM
> To: [email protected]
> Subject: [U2] UV calling chuser from application
> 
> HI All,
> 
> We want to lock out a user's UNIX login id, after three 
> failed attempts into our application. We are using the 
> following command from the application that monitors the 
> fail/success of the login attempt at the application level.
> EXECUTE 'SH -c "chuser account_locked=true ':@logname:'"'

You might try creating a shell script that executes the chuser command,
then set the suid bit on the script so it will run as root.  For
example, if you create a script named lock_me_out with the following
contents:

#!/bin/sh
if [ $1 != root ] && [ "$1" != "" ]; then
   chuser account_locked=true $1
fi

Then set the permissions on the script to:
"rws--x--x"

The basic code would read:
EXECUTE 'SH -c "lock_me_out ':@logname:'"'

-John
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to