Ask Your Question
0

How can I configure polkit policy?

asked 2013-10-31 08:45:56 -0500

updated 2014-09-30 15:10:32 -0500

mether gravatar image

How can I configure the policy for a particular set of polkit actions? For example, I would like to be able to manage virtual machines using virt-manager without being prompted for a password when I start the application.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-11-02 07:43:36 -0500

Ahmad Samir gravatar image

As root create /etc/polkit-1/rules.d/90-custom.rules, and put this in it:

polkit.addRule(function(action, subject) {
    if (action.id == "org.libvirt.unix.manage" &&
        subject.isInGroup("YOUR_GROUP") && subject.active) {
        return polkit.Result.YES;
    }
});

replace YOUR_GROUP above as necessary.

You can get the exact action id from the system logs after trying to authenticate.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-10-31 08:45:56 -0500

Seen: 996 times

Last updated: Nov 02 '13