[CentOS] Disabling shutdown and suspend for normal users

Bernhard Gschaider bgschaid_lists at ice-sf.at
Wed Sep 19 16:04:18 UTC 2007

>>>>> On Wed, 19 Sep 2007 16:51:42 +0200
>>>>> "HvL" == Henk van Lingen <henkvl at cs.uu.nl> wrote:

    HvL> On Wed, Sep 19, 2007 at 03:49:34PM +0200, Bernhard Gschaider
    HvL> wrote:
    >> Just set HaltCommand to nothing:
    >> HaltCommand=
    >> Same for Reboot and Suspend (Havn't tried suspend yet) but my
    >> machines allow Reboot and Halt neither from the user menus nor
    >> the Login-Screen

    HvL>   For Reboot and Halt this works. Setting SuspendCommand=
    HvL> does nothing.  Suspend still shows up in the menu, and hangs
    HvL> the machine.

You have also tried it with a lowercase S? Stupid question, but the
relevant section in /usr/share/gdm/defaults.conf says:

# Reboot, Halt and suspend commands, you can add different commands separated
# by a semicolon.  GDM will use the first one it can find.
RebootCommand=/sbin/reboot;/sbin/shutdown -r now;/usr/sbin/shutdown -r now;/usr/bin/reboot
HaltCommand=/sbin/poweroff;/sbin/shutdown -h now;/usr/sbin/shutdown -h now;/usr/bin/poweroff

It may be typo ...

More information about the CentOS mailing list