I configured one of the PCs to act as a server. It will be used by other emloyees as well via the guest account. Obviously I don't want the PC to be shut down by any user. Also I have to shut it down before I leave every day. Is there a way by which I can confgure it to ask for username/password of an admin account whenever someone tries to shut down the PC?

I am running Ubuntu 14.04/Unity.


You can use Polkit rules to control the GUI shutdown privileges (the shutdown command isn't affected, and needs root as usual). A set of rules like in this answer should do. Create a .pkla file in /etc/polkit-1/localauthority/50-local.d/ (say 00-disable-shutdown.pkla):

[Disable Shutdown, etc. for all users]

The auth_admin policy will require that an administrative user (by default, members of the sudo group) authorize it.

| improve this answer | |
  • Does not work, should I set any permissions? – daltonfury42 Jul 6 '15 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.