Wayne Cornish id@nooped.com wrote:
On Sat, Nov 08, 2003 at 11:52:05AM +0000, 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?
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.
SetUID evil! I'd definately go for a sudo job, and probably alias halt to sudo halt, reboot to sudo reboot and shutdown to sudo shutdown. Also makes it easy to add any other programs in to the list, *AND*, means you can limit which users have access to which groups of commands.
Just my 2ps worth.
Brett