Difference between revisions of "Polkit"

From ArchWiki
Jump to: navigation, search
(Created page with "'''PolicyKit''' is used for controlling system-wide privileges. It provides an organized way for non-privileged processes to communicate with privileged ones. In contrast to syst...")
 
(guess {{{stub}}} wasn't defined..)
Line 30: Line 30:
  
 
(Use the command <code>pkaction</code> to list all actions defined in your system.)
 
(Use the command <code>pkaction</code> to list all actions defined in your system.)
 
{{{stub}}}
 

Revision as of 19:40, 18 March 2011

PolicyKit is used for controlling system-wide privileges. It provides an organized way for non-privileged processes to communicate with privileged ones. In contrast to systems such as sudo, it does not grant root permission to an entire process, but rather allows a finer level of control of centralized system policy.


Practical examples

How to let all users in the group "wheel" have the same admin rights as root (so you don't have to enter root password, but the wheel user's password):

Make a file like:

   /etc/polkit-1/localauthority.conf.d/60-localauthority.conf

(higher numbers are prioritied over lower ones) containing:

[Configuration]
AdminIdentities=unix-user:0;unix-group:wheel

To let users alice and bob perform all PackageKit actions (but not necessarily other PolicyKit actions), make a file in e.g.

   /etc/polkit-1/localauthority/50-local.d/10-my-pkgkit-policy.pkla

containing

[Let Wheel Use PackageKit]
Identity=unix-user:alice;unix-user:bob
Action=org.freedesktop.packagekit.*
ResultAny=no
ResultInactive=no
ResultActive=auth_self_keep

(Use the command pkaction to list all actions defined in your system.)