Re: The right way to power off a computer as non-root
On Wed, Jan 02, 2002 at 02:24:37PM +0100, Thomas Deselaers wrote:
> I use my computer as a workstation and thus I think it would be a good idea
> to be able to switch it of as user without being root.
> I had two ideas of making this possible. The one is to make it sudo-able and
> the other is to put the executable into a special group (e.g. poweroffer)
> and then make the binaries suid-root executable for this group and put the
> users which ought to be allowed to poweroff the workstation into this group.
You forgot option #3: Have them go to a text console (by shutting
down X ot pressing ctrl-alt-F1) and press ctrl-alt-del. By default,
this will reboot the machine, but you can go into /etc/inittab, find
the lines that say
# What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
and change it to do whatever you want (like, say, shutdown -h instead
of shutdown -r).
--
When we reduce our own liberties to stop terrorism, the terrorists
have already won. - reverius
Innocence is no protection when governments go bad. - Tom Swiss
Reply to: