Bug 1378730

Summary: Failed to save password with ticking 'Save this password in your keyring' using virt-manager for root user.
Product: Red Hat Enterprise Linux 7 Reporter: zhoujunqin <juzhou>
Component: gnome-keyringAssignee: David King <dking>
Status: CLOSED NOTABUG QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: dking, mxie, mzhan, tzheng, xiaodwan
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-09 15:26:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description zhoujunqin 2016-09-23 08:35:01 UTC
Description of problem:
Failed to save password with ticking 'Save this password in your keyring' using virt-manager for root user.

Version-Release number of selected component (if applicable):
virt-manager-1.4.0-2.el7.noarch
libvirt-2.0.0-10.el7.x86_64
pygobject3-3.14.0-3.el7.x86_64

How reproducible:
100%

Steps to Reproduce:

1. Prepare a vnc or spice guest with password set.
eg:
# virsh dumpxml rhel6.8-spice --security-info |grep passwd
    <graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1' passwd='aaaaaa'>
2. Launch virt-manager
# virt-manager
3. Open the guest and type correct password, make sure you can login successfully.
4. Close the guest window and open the guest again, type correct password and with checking on 'Save this password in your keyring', then click login button, login successfully.
5. Close the guest window, and open the guest again, check password is remembered or not and also check "Save this password in your keyring" is ticked or not.


Actual results:
Password is not remembered and "Save this password in your keyring" is not ticked.

Expected results:
Password is remembered and "Save this password in your keyring" is ticked.

Additional info:
1. virt-manager debug info:

[Fri, 23 Sep 2016 02:20:32 virt-manager 14217] DEBUG (keyring:59) Using keyring session /org/freedesktop/secrets/session/s2
[Fri, 23 Sep 2016 02:20:39 virt-manager 14217] ERROR (keyring:87) Failed to add keyring secret
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/keyring.py", line 84, in add_secret
    props, params, replace)[0]
  File "/usr/lib64/python2.7/site-packages/gi/overrides/Gio.py", line 171, in __call__
    None)
Error: g-io-error-quark: GDBus.Error:org.freedesktop.Secret.Error.NoSuchObject: The '/org/freedesktop/secrets/aliases/default' object does not exist (36)

2. It works with non-root user.
$ virt-manager -c qemu:///system

Comment 1 Pavel Hrdina 2017-03-03 15:22:57 UTC
From the traceback it's clear that virt-manager connects to gnome-keyring and that gnome-keyring fails that the keyring file itself doesn't exist.  However it may be already fixed because when I was investigating this bug the ~/.local/share/keyrings/login.keyring is automatically created when root user logs in.

I'm moving this bug to gnome-keyring so they can properly close it with better explanation.

Comment 3 David King 2020-12-09 15:26:24 UTC
Does not seem reproducible based on comment #1, but if the login keyring is not automatically created with more recent versions, please file a new bug.

Comment 5 Red Hat Bugzilla 2023-09-14 03:31:16 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days