[SLUG] shutdown: you must be root to do that!
Gavin Baker
gav at supercowpowers.org
Fri Sep 19 14:52:01 BST 2003
On Fri, 2003-09-19 at 13:51, Al Girling wrote:
> I think you're on the right lines here, but when I tried the /sbin/shutdown
> method, I'm still getting "You must be root to do this" messages. I guess
> there's something else needs to be changed. Give myself permission to use
> another group or some such?
You forgot to make it setuid root.
# chmod u+s /sbin/shutdown
shutdown needs to be run as root. Its hardcoded into the program.
Making it setuid root means it will run *as* root for anyone who has permission
to run (+x) it, which is just root and members of the adm group in your case.
/sbin won't be in your regular users path. So you will have to run
"/sbin/shutdown" rather than just "shutdown". I personally would not add /sbin
to your user accounts $PATH just for this. It's only 6 extra letters to type
after all, or 2 if you /s<TAB> ;)
Gav
--
Gavin Baker <gav at supercowpowers.org>
More information about the Scarborough
mailing list