id@nooped.com (Wayne Cornish) writes:
Edenyard wrote:
What is the correct way of making 'ordinary' users (i.e., not root) able to shut the PC off at the end of the session?
CTRL-ALT-DEL seems perfectly sensible to me.
I've no idea of the "correct" way, as I wouldn't allow anybody but root to shutdown any of my boxes. ;)
Only root has access to the power cable, then?
What I'd probably do is make /sbin/halt SUID root(chmod it to 4750), then chown it to root.shutdown or somesuch, and add the users you want to be allowed to shutdown the box, to the `shutdown' group.
I'd suggest doing that to shutdown instead of halt - it appears (from Debian's source) to be actually designed for setuid running, which halt is not, and making programs setuid when they are not designed for it can lead to unintended consequences.