by anonymous_user » Sat Sep 28, 2013 4:24 pm
If you could detect whether a Linux distro was using ConsoleKit or systemd, then shutting down as a user should be possible. I forgot the ConsoleKit commands (though I remember them being long) and for systemd you can simply use systemctl poweroff. And if neither is detected then simply disable the option for shutdown.
Edit: or perhaps you can let people enter a custom command. Some people may have removed the password require for the shutdown command and wish to use that.