Skip to content

Instantly share code, notes, and snippets.

@mfonville
Created May 17, 2016 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfonville/d73766434ed404a5b5279acf565a649f to your computer and use it in GitHub Desktop.
Save mfonville/d73766434ed404a5b5279acf565a649f to your computer and use it in GitHub Desktop.
Prevent default logged in from rebooting or shutting down the machine
#save as /etc/polkit-1/localauthority/99-dontrebootserver/disable-reboot.pkla
[Disable power-off]
Identity=unix-user:*
Action=org.freedesktop.login1.power-off;org.freedesktop.login1.power-off-multiple-sessions
ResultActive=no
[Disable reboot]
Identity=unix-user:*
Action=org.freedesktop.login1.reboot;org.freedesktop.login1.reboot-multiple-sessions
ResultActive=no
[Disable suspend]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend;org.freedesktop.login1.suspend-multiple-sessions
ResultActive=no
[Disable hibernate]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.hibernate-multiple-sessions;org.freedesktop.upower.hibernate
ResultActive=no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment