> 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:'"'

Thanks John; this is promising! 

One thing that I am having trouble with is the permissions. I set them
up as above, with the group = to the user's group.
The file permissions are:
-rws--x--x   1 root     cubs
The basic code is:
>CT PROS-BP SJF.TEST.SH

     SJF.TEST.SH
0001 EXECUTE 'SH -c "test.sh ':@logname:'"'

The output is:
>run PROS-BP SJF.TEST.SH
/bin/sh: /u1/dbms/TCR/test.sh: 0403-016 Cannot find or open the file.

I need to give 'r'ead access to the 'cubs' group for this to work.
However, if I run the script from UNIX with the permissions set as John
suggested it works fine. I would prefer not to give users the ability to
read the file. It looks like the basic code needs to read the file
before it can execute it.

What is it about calling the program from basic, that requires 'r'ead
access for the group, but from unix it is okay?

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

Reply via email to