Thomas Deselaers wrote: >Hello, > >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. > >Of course this would be possible with gdm, but due to some other problems >with gdm I reported a time ago which I still have not fixed I don't want to >use gdm.
Bad solution is to include /sbin in the users' path, then make shutdown et. al. SUID root (please never resort to doing this. This is a BAD solution). The solutions you offered are far better than the BAD solution. However, I don't like the idea of making more binaries suid root. Better stick with sudo than suid root. If you're not adamant to use gdm (though I think that for all its worth, gdm is pretty versatile and useful. I didn't encounter any problem with it), a less lazy soln is stick with CTRL-ALT-DEL to reboot the machine. Now how to halt the machine - use the powerful bootloader GRUB. #grub menu file: /boot/grub/menu.lst #assuming root is first disk, first partition timeout -1 title Linux root (hd0,0) kernel /vmlinuz root=/dev/hda1 #halt the computer title shutdown thy PC halt The laziest way is to CTRL-ALT-DEL and hit the power button after all's done. Paolo Falcone __________________________________ www.edsamail.com