Skip to content

Polkit

Config

  • 3rd party packages can use /usr/share/polkit-1/rules.d
  • /etc/polkit-1/rules.d is for local configuration
systemctl status polkit.service

Usage

List all actions defined in /usr/share/polkit-1/actions:

pkaction

Show details of specific action:

pkaction -av se.leap.bitmask.policy

Example rules

Allow pamac use without authentication:

Add this policy to /etc/polkit-1/rules.d/49-pamac-passwordless.rules

polkit.addRule(function(action, subject) {
    if (action.id == "org.manjaro.pamac.commit" && subject.isInGroup("varac")) {
        return polkit.Result.YES;
    }
})

Debug

Show polkitd logs, filtering for action:

journalctl -t polkitd -n 10 | grep action