[PLUG] how to kill pppd if you're not root

Scott Minster sminster@purdue.edu
Mon, 10 Jul 2000 23:26:26 -0500 (EST)


Yes, this is a silly question, but I can't seem to figure it out.

I can kill pppd just fine, since I know the root password.  Unfortunately,
my roommate does not.  For some reason, the network scripts I have for
dialing in don't kill pppd, and I have to do it manually.  So, my stupid
question is how do I make a script that allows my roommate (who has an
account on my box) to kill pppd if I'm not around (since only I can become
root)?

I have a script that works (if root runs it), but I can't seem to get it
to run as root for someone who isn't root.
I've tried obvious things like
chmod 4755 killpppd
and
chmod u+s killpppd
but that doesn't work.
I know it doesn't work (because kill doesn't work in the script), because
I can have the script print out the $UID environment variable and it
doesn't print out 0 (it prints out the user's UID).

So, what's the magic command to setuid a script to root?

--Scott