Bug 1955860

Summary: kwallet not opening at login
Product: [Fedora] Fedora Reporter: Ed Greshko <ed.greshko>
Component: pam-kwalletAssignee: Rex Dieter <rdieter>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 34CC: accounts+fedora, agurenko, alex765, gs8usoo2, jgrulich, kde-sig, massi.ergosum, orion, rdieter
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pam-kwallet-5.22.4-3.fc34 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-02 01:05:03 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:
Attachments:
Description Flags
This appears at login after installing updates none

Description Ed Greshko 2021-05-01 02:48:02 UTC
Description of problem: After an upgrade from F33 to F34 kwallet fails to open at login most of the time.


Version-Release number of selected component (if applicable):


How reproducible: Simply login with a Wifi connection and its secrets saved for
only the user and auto-connection.


Steps to Reproduce:
1.
2.
3.

Actual results: kwallet not open.  Prompts for kwallet password.  If not known, or entered incorrectly 3 times it will then prompt for the Wifi password.


Expected results: The user should see no prompts and the Wifi connection will be made.


Additional info:

May 01 06:47:05 meimei.greshko.com sddm-helper[2543]: pam_kwallet5(sddm:auth): (null): pam_sm_authenticate
May 01 06:47:05 meimei.greshko.com sddm-helper[2543]: pam_kwallet5(sddm:setcred): pam_kwallet5: pam_sm_setcred
May 01 06:47:06 meimei.greshko.com sddm-helper[2543]: pam_kwallet5(sddm:session): pam_kwallet5: pam_sm_open_session
May 01 06:47:06 meimei.greshko.com sddm-helper[2564]: pam_kwallet5: final socket path: /run/user/1026/kwallet5.socket
May 01 06:47:06 meimei.greshko.com audit[2543]: USER_START pid=2543 uid=0 auid=1026 ses=2 subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_selinux,pam_loginuid,pam_selinux,pam_keyinit,pam_namespace,pam_keyinit,pam_limits,pam_systemd,pam_unix,pam_gnome_keyring,pam_kwallet5,pam_umask,pam_lastlog acct="egreshko" exe="/usr/libexec/sddm-helper" hostname=? addr=? terminal=:0 res=success'
May 01 06:47:09 meimei.greshko.com kwalletd5[2565]: Wallet failed to get opened by PAM, error code is -9
May 01 06:47:10 meimei.greshko.com systemd[2548]: app-pam_kwallet_init: Deactivated successfully.

Comment 1 Rex Dieter 2021-05-01 07:13:57 UTC
Preferably, this should be filed upstream at bugs.kde.org

Comment 2 Ed Greshko 2021-05-01 08:48:05 UTC
(In reply to Rex Dieter from comment #1)
> Preferably, this should be filed upstream at bugs.kde.org

OK.  https://bugs.kde.org/show_bug.cgi?id=436442

Got "tricked up" by them calling the package kwallet-pam.  :-)

Comment 3 Rex Dieter 2021-07-30 18:17:56 UTC
*** Bug 1976528 has been marked as a duplicate of this bug. ***

Comment 4 Fedora Update System 2021-07-30 18:18:23 UTC
FEDORA-2021-946bf990d0 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-946bf990d0

Comment 5 Ed Greshko 2021-07-31 06:38:52 UTC
Created attachment 1809599 [details]
This appears at login after installing updates

Comment 6 Ed Greshko 2021-07-31 06:40:44 UTC
The updates do not fix this issue for me.

I reboot the system and login.  My Wifi secrets are in the wallet.

I get the prompt as shown in the above attachment.

Let me know what info you need to fix this issue.

Comment 7 Ed Greshko 2021-07-31 06:42:22 UTC
Or maybe this will help?

[egreshko@meimei ~]$ journalctl -b 0 | grep wallet
Jul 31 13:44:25 meimei.greshko.com sddm-helper[2608]: pam_kwallet5(sddm:auth): (null): pam_sm_authenticate
Jul 31 13:44:25 meimei.greshko.com sddm-helper[2608]: pam_kwallet5(sddm:setcred): pam_kwallet5: pam_sm_setcred
Jul 31 13:44:26 meimei.greshko.com sddm-helper[2608]: pam_kwallet5(sddm:session): pam_kwallet5: pam_sm_open_session
Jul 31 13:44:26 meimei.greshko.com sddm-helper[2629]: pam_kwallet5: final socket path: /run/user/1026/kwallet5.socket
Jul 31 13:44:26 meimei.greshko.com audit[2608]: USER_START pid=2608 uid=0 auid=1026 ses=2 subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_selinux,pam_loginuid,pam_selinux,pam_keyinit,pam_namespace,pam_keyinit,pam_limits,pam_systemd,pam_unix,pam_gnome_keyring,pam_kwallet5,pam_umask,pam_lastlog acct="egreshko" exe="/usr/libexec/sddm-helper" hostname=? addr=? terminal=:0 res=success'
Jul 31 13:44:27 meimei.greshko.com systemd[2613]: Started Unlock kwallet from pam credentials.
Jul 31 13:44:27 meimei.greshko.com kwalletd5[2630]: Wallet failed to get opened by PAM, error code is -9
Jul 31 13:44:30 meimei.greshko.com kwalletd5[2630]: Application ' "kded5" ' using kwallet without parent window!
Jul 31 13:45:07 meimei.greshko.com kwalletd5[2630]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1294, resource id: 16777374, major code: 40 (TranslateCoords), minor code: 0

Comment 8 Rex Dieter 2021-07-31 11:49:59 UTC
Please report your findings in the upstream bug, thanks

Comment 9 Rex Dieter 2021-07-31 11:51:18 UTC
To be in the safe side, reboot after installing this update, if you didn't already.

Comment 10 Ed Greshko 2021-07-31 12:27:42 UTC
(In reply to Rex Dieter from comment #9)
> To be in the safe side, reboot after installing this update, if you didn't
> already.

I suppose you missed what I said in #6?

Comment 11 Rex Dieter 2021-07-31 14:03:36 UTC
Possible there are multiple issues going on here.

For me, kwallet was opening too late in the login process.

For you, appears kwallet is not opening *at all*. 

Good news is that we can diagnose that a little better now.

1.  let's verify what you have installed:
rpm -q pam-kwallet plasma-workspace

should say:
pam-kwallet-5.22.4-2.fc34.x86_64
plasma-workspace-5.22.4-2.fc34.x86_64

2.  What does this say?
systemctl --user status plasma-kwallet-pam

For me,
○ plasma-kwallet-pam.service - Unlock kwallet from pam credentials
     Loaded: loaded (/usr/lib/systemd/user/plasma-kwallet-pam.service; static)
     Active: inactive (dead) since Fri 2021-07-30 12:46:00 CDT; 20h ago
   Main PID: 3381 (code=exited, status=0/SUCCESS)
        CPU: 9ms

Jul 30 12:46:00 fedora systemd[3253]: Started Unlock kwallet from pam credentials.

Comment 12 Ed Greshko 2021-07-31 15:33:03 UTC
This is after I've rebooted, logged in, and given the password manually.  Let me know if what something different and I can do that in my AM.

[egreshko@meimei ~]$ rpm -q pam-kwallet plasma-workspace
pam-kwallet-5.22.4-3.fc34.x86_64
plasma-workspace-5.22.4-2.fc34.x86_64

[egreshko@meimei ~]$ systemctl --user status plasma-kwallet-pam
○ plasma-kwallet-pam.service - Unlock kwallet from pam credentials
     Loaded: loaded (/usr/lib/systemd/user/plasma-kwallet-pam.service; static)
     Active: inactive (dead) since Sat 2021-07-31 19:43:47 CST; 3h 47min ago
    Process: 32002 ExecStart=/usr/libexec/pam_kwallet_init (code=exited, status=0/SUCCESS)
   Main PID: 32002 (code=exited, status=0/SUCCESS)
        CPU: 6ms

Jul 31 19:43:46 meimei.greshko.com systemd[31838]: Started Unlock kwallet from pam credentials.

Comment 13 Fedora Update System 2021-08-02 01:05:03 UTC
FEDORA-2021-946bf990d0 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.