Brad Beyenhof wrote: > John H. Robinson, IV wrote: > >Lan Barnes wrote: > >>Thing is, scripts can't run as root, so you have to start it as a user. > > > >Two ways around that: > >1) write a SUID wrapper in C that can call the program. > >2) sudo > > Can't you just set the SUID bit in the script file, and chown to root?
Nope. [EMAIL PROTECTED]:/tmp]% cat try.sh #!/bin/sh whoami [EMAIL PROTECTED]:/tmp]% ls -l try.sh -rwsr-xr-x 1 root root 17 Sep 21 11:03 try.sh [EMAIL PROTECTED]:/tmp]% ./try.sh jhriv [EMAIL PROTECTED]:/tmp]% sudo ./try.sh Password: root -john -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-newbie
