Disabling Shutdown and Reboot in GNOME logout menu

For workstations that have to be shared among different users, there are some steps Administrators can do to prevent users from rebooting or shutdown


1. Changing GNOME System Menu

Change the gdm's config file
# vim /etc/X11/gdm/gdm.conf

Find a line in the gdm.conf
# SystemMenu = false

2. To Prevent users from opening a termina and running "poweroff" or "reboot"
Delete or move these files:
/etc/security/console.apps/poweroff
/etc/security/console.apps/reboot

3. Prevent shutdown using Alt-Ctrl-Del
# vim inittab

# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now

And change it to read:
# Disallow CTRL-ALT-DELETE
ca::ctrlaltdel:/bin/echo "ctrl-alt-delete has been disabled"

Modify the ownership
#sudo chgrp root /sbin/halt /sbin/shutdown
#sudo chmod 550 /sbin/halt /sbin/shutdown

Articles:

  1. Disable Shutdown For Normal Users (Ubuntu Blog)
  2. Disable shutdown/reboot in GNOME logout menu (Fedora Mailing List)