Running processes as root
Jonathan Bayer
jbayer at ispi.UUCP
Sat Oct 21 22:58:05 AEST 1989
aidan%ncl.shire at newcastle.ac.uk (Aidan Saunders) writes:
>I have a script which needs to run as root and can be used by one group of
>users. I thought this was straightforward but it doesn't work...
>The program prog1 is a shell script owned by root in group staff and of
>mode 4750
The set-uid bit does not work for shell scripts. You will have to write
a small program (or grab one from the archives) that will then execute
the shell script. The program will be able to use the set-uid bit, and
the script that is run then will run as root. This is generally not
a good idea.
JB
--
Jonathan Bayer Intelligent Software Products, Inc.
(201) 245-5922 500 Oakwood Ave.
jbayer at ispi.COM Roselle Park, NJ 07204
More information about the Comp.unix.questions
mailing list