Re: system shutdown from xdm
I have a /usr/local/bin/shutdown like this:
su -c "shutdown $1 $2 $3 $4 $5"
Anybody can run shutdown, but they'll need the root password.
If you want anybody to shutdown without password, make
/sbin/shutdown a suid executable. Make shutdown a menu choice
in your window manager for user friendliness.
Don't do the suid thing unless *anybody* logging into your machine
should be able to stop it! This includes logging in
via network or possibly the internet.
It is ok for an unconnected home machine though.
Helge Hafting
Reply to: