how to setuid for shell scripts on ultrix?

mdivax1!robinson mdivax1!robinson
Fri Nov 16 05:14:48 AEST 1990


In article <25009 at adm.brl.mil> K390590%AEARN at pucc.princeton.edu ( Steinparz Franz) writes:
>Could someone give me advice how to make a shell script which inherits
>its access rights from its owner as this is done by set uid for regular
>programs. Just setting the set uid bit via CHMOD 06xxx does not work
>on vax under ultrix.

I have always been under the impression that setuid shell scripts
intentionally do not work for BSD derived unixes in deference to security
considerations.  However, our experience with ultrix 4.0 (and I believe
2.0) is that *if and only if* "#!/bin/some-shell" is the first line of the
script, then setuid will work for that script. However, does this behaviour
not violate the whole point of not allowing setuid shell scripts - i.e.,
that they are a security risk?  And, if it was indeed the intention to
allow setuid shell scripts, why not go all the way and not require the
leading "#!/bin/shell" as is the case with System V?
-- 
Jim Robinson
{uunet,ubc-cs}!van-bc!mdivax1!robinson



More information about the Comp.unix.ultrix mailing list