On 01/15/2016 07:44 PM, Nate Pearlstein wrote:
I’ve been trying to get policykit to automatically authorize
virt-manager.
This was working fine with fedora 21, but with fedora 23 it doesn’t seem to work. For
both I’ve been using the mate desktop.
With f21 I had the following in
/etc/polkit-1/localauthority/50-local.d/caprica.libvirt.pkla
[Allow user libvirt management permissions]
Identity=unix-user:user
Action=org.libvirt.unix.manage
ResultAny=yes
ResultInactive=yes
ResultActive=yes
That format hasn't worked for quite a while, due to a polkit change.
I tried the above with f23 and no luck. I’ve since tried
/etc/polkit-1/rules.d/80-libvirt.rules
polkit.addRule(function(action, subject) {
if (action.id == "org.libvirt.unix.manage" && subject.local
&& subject.active && subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
At a glance that looks like it should work, but I didn't confirm the syntax.
However on fedora 22+ the recommended way to do this is to add yourself to the
'libvirt' group:
http://blog.wikichoon.com/2016/01/polkit-password-less-access-for-libvirt...
- Cole