<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 29, 2020 at 8:39 PM Michal Privoznik <<a href="mailto:mprivozn@redhat.com">mprivozn@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 10/29/20 4:47 PM, Natxo Asenjo wrote:<br>
> ah, yes. I try this:<br>
> <br>
> $ virsh -c qemu:///system<br>
> <br>
> But it then I get a prompt:<br>
> <br>
> ==== AUTHENTICATING FOR org.libvirt.unix.manage =============<br>
> System policy prevents management of local virtualized systems<br>
> Authenticating as:  sudo_user_not_disclosed<br>
> Password:<br>
> Password:<br>
> polikit-agent-helper-1: pam_authenticate failed: Authentication failure<br>
> <br>
> Our allowed groups in the /etc/dbus-1/system.d/org.libvirt.conf are no <br>
> sudo users (this can change, but not as of now). It is a bit strange <br>
> that the get the password prompt for a local sudo user we have in place <br>
> for as systems have no working sssd connection to the idm realm (break <br>
> glass user)<br>
> <br>
> My user can use the system bus in cockpit without a password.<br>
> <br>
> The dbus policy looks like this:<br>
> <br>
> <policy group="groupname"><br>
>      < allow send_destination="org.libvirt"/><br>
> </policy><br>
> <policy group="other_groupname"><br>
>      < allow send_destination="org.libvirt"/><br>
> </policy><br>
<br>
This is expected. qemu:///system uses an unix socket to talk to libvirtd <br>
and not dbus. I don't know what credentials does cockpit set there.<br>
But I'm not sure it's safe to go behind cockpit's back and talk to <br>
libvirt directly. If you'd change a configuration of a VM it may not be <br>
reflected in cockpit.<br>
<br></blockquote><div><br></div><div>to be honest, I found about the dbus system connection policies in the cockpit documentation, the have a link to the libvirt dbus snippet page:<br></div><div><br></div><div><a href="https://cockpit-project.org/guide/latest/feature-virtualmachines">https://cockpit-project.org/guide/latest/feature-virtualmachines</a></div></div><div class="gmail_quote"><br></div><div class="gmail_quote">So is it not possible (taking cockpit out of the equation) to allow virsh to run as a normal user to connect to the local system connection? <br></div><div class="gmail_quote"><br></div><div class="gmail_quote">-- <br></div><div class="gmail_quote">regards,</div><div class="gmail_quote">Natxo<br></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">--<br>Groeten,<br>natxo</div></div>