Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

On a traditional Unix system, non-root users cannot do this. What is it that gives users this ability in modern desktop environments and how would I go about disabling this on a per-user or per-group basis?

I've seen a great method to prevent anybody from shutting down/suspending, but ideally what I'm looking for is to prevent certain users (such as, by adding/removing them from a certain usergroup) from being able to execute a shutdown, restart, suspend.

share|improve this question

1 Answer 1

up vote 20 down vote accepted

As mentioned in the other question, you can control these actions via PolicyKit's local authority system.

If you create a file /etc/polkit-1/50-local.d/restrict-shutdown.pkla with content like:

[Disable shutdown/etc for group restricted]

This will prevent any member of the group restricted from performing the matched actions. Alternatively, if you want to restrict individual users, replace unix-group:restricted with unix-user:user1;unix-user:user2;.... Any user not matched by this policy should end up with the default behaviour.

share|improve this answer
Great answer and explanation, thanks –  thomasrutter May 4 '12 at 2:12
No longer works on 14.04.1. –  detly May 24 at 5:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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