"Daniel J. Smale - RSG" <dasm@pml.ac.uk> schreef in bericht
news:3ef80be2$1@news.nwl.ac.uk...
> Guys & Gals,
>
> How do I enable a non-root user to execute:
>
> shutdown -h 0
>
> The only message I get is that only root can do this.
>
> I've checked the permissions on the shutdown binary, and it is
> executable by all (obviously, else it would display the message!)
>
> I am missing a step... could someone please fill me in?
>
> TIA,
>
> Dan.
>
You can configure /etc/inittab to shut down the system on pressing
CTRL-ALT-DEL;
this is IMO the cleanest way.
It's true that normal users can run shutdown but they don't have the root
permissions to
make the system calls, so you have to do chmod +s /sbin/shutdown or
/sbin/halt (not
sure whether they live in /sbin) so that the executables are run as root.
But /sbin is not in the $PATH for normal users so you could place a symlink
from
/usr/local/bin/halt to /sbin/halt so that it's found when somebody wants to
run it.
There, that should be enough info for you
JOoSt