Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] Set UID programs


>Some solutions:
>    su blah -c "/bin/sh myscript"
>    (This will prompt for password if I am not already root and "blah"
>needs a password)
>    or
>    # chmod u+s blah myprogram
>    Then, when called, myprogram should run as user "blah", although it
>probably won't work over NFS.
>
>Which is preferable?
>Are there other ways of doing it?

Personally I prefer to chmod the binary to run as the required user, although I
do not do this if the binary or script requires root access.
The reasoning is this. If th binary will only run as that user and there are no
other options in running it, then why put the password in every time unless it
is a security threat? User blah should not, of course, have the capacity to
wreak havoc on the scene.. thats a given, I'd hope!

Aaron
**********************************************************************************************