Skip to content

Instantly share code, notes, and snippets.

@khanhicetea
Created October 4, 2016 12:59
Show Gist options
  • Save khanhicetea/5a2cbfc6bfd216386a40db2197046ab0 to your computer and use it in GitHub Desktop.
Save khanhicetea/5a2cbfc6bfd216386a40db2197046ab0 to your computer and use it in GitHub Desktop.
Prevent virt-manager ask password (centos 6)

The password prompt was made for system security so if you do this might make it vulnerable.

Create the Group group on your machine. or you can run this "sudo groupadd -r [Group]" You can any user you want to this system group by runing "sudo usermod -a -G [Group] [User]" Now you need to create our PolicyKit policy that will allow the users of Group to run virt-manager you will create a file at this path:"/etc/polkit-1/localauthority/50-local.d/50-org.Group-libvirt-local-access.pkla" and you will put lines below in it

[Allow group [Group] libvirt management permissions]
Identity=unix-group:[Group]
Action=org.libvirt.unix.manage
ResultAny=yes
ResultInactive=yes
ResultActive=yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment