[CentOS] Disabling the shutdown buttons in graphical login screen of CentOS 6.3

Tue Feb 12 13:51:43 UTC 2013
Andrea*s Jackie Klaura <andreas.klaura at univie.ac.at>

Hi,

I am not sure if I probably have overlooked some important clue, but I 
am stuck with a problem with the gdm-greeter in CentOS 6.3 here since 
three days without finding any suitable solution.

The problem:
* I have to somehow deactivate the "Suspend", "Restart" and "Shutdown" 
options in the login screen.
* This has to be done in CLI mode, as I have to change this on many machines

Tried out solutions:
* As far as I could figure out gdm-simple-greeter would be the programm 
I'd have to tweak. But changing options in /etc/gdm/custom.conf does not 
change anything (as if this file would be ignored).
* Another thing would be to set the 
/apps/gdm/simple-greeter/disable_restart_buttons option to true through 
gconftool-2. But this option also seems to be ignored. Several posts on 
the web point to this being a bug which is fixed in RHEL but not CentOS.
* I also tried to limit access to all the poweroff, reboot and halt 
commands through pam.d so that only root would be allowed to shutdown. 
This did not work either.
* I even tried to rename the /sbin/reboot command (and therefore 
deactivate all the different links pointing to it). Still clicking the 
buttons still lead to a shutdown (although at some point it got stuck, 
but the system was not reachable any more).

Additional remarks:
* I did also delete /etc/acpi/events/power.conf in order to disable the 
physical power button on the machine. At least that did work, but the 
problem still is that normal users can shutdown the machine through the 
gdm login screen.

If anyone has any hints, I would be very glad. And sorry if I overlooked 
anything, but meanwhile I am getting a bit desperate.
Looking through the web and different mailing lists and fora gave me the 
impression that there are still several people out there with this 
problem and no real solution is around.


thanks,
cheers,
jackie

-- 
Andrea*s Jackie Klaura
University of Vienna
Institute of Theoretical Chemistry
Waehringerstr. 17
A-1090 Vienna, Austria
tel: +43 (0)1 4277 52756