You are not logged in.

#1 2025-02-06 23:50:45

nooobeee
Member
Registered: 2021-09-17
Posts: 37

Nextcloud auth at login

I am having the issue where Nextcloud desktop requests authentication at each login.  I've spent way too much time on this leading me to suspect that I'm making this more difficult than it needs to be somehow.

In digging into this, I found an indication that this may be due to a keyring/keychain issue.  I have kwallet installed so I installed kwalletmanager and discovered nothing in there so I created a new wallet and used the same name as my login along with the same password but the problem persisted.  I added the following to the hyprland.conf with no change:

exec-once = /usr/lib/pam_kwallet_init

When I launch kwalletmanager, I noticed that the wallet doesn't seem to be automatically unlocked by SDDM when logging in.  I suspect this to be the issue?

I've looked through the sddm.conf but can't find anything related to kwallet.  I am not using auto-login or passwordless login so I'm not sure what I'm missing here.

First, am I on the right track to address the Nextcloud auth issue?  If not, some direction on that would be helpful.
If so, can someone point me in the right direction to get sddm to unlock my wallet automatically upon login?

Offline

#2 2025-02-07 02:59:50

nooobeee
Member
Registered: 2021-09-17
Posts: 37

Re: Nextcloud auth at login

I checked out the pam.d entries and noticed login was:

#%PAM-1.0

auth       requisite    pam_nologin.so
auth       include      system-local-login
account    include      system-local-login
session    include      system-local-login
password   include      system-local-login

so I updated it to:

#%PAM-1.0

auth       requisite    pam_nologin.so
auth       include      system-local-login
auth       optional     pam_kwallet5.so
account    include      system-local-login
session    optional     pam_kwallet5.so auto_start
session    include      system-local-login
password   include      system-local-login

I also noticed sddm was:

#%PAM-1.0

auth        include     system-login
-auth       optional    pam_kwallet5.so

account     include     system-login

password    include     system-login

session     optional    pam_keyinit.so          force revoke
session     include     system-login
-session    optional    pam_kwallet5.so         auto_start

so I updated it to:

#%PAM-1.0

auth        include     system-login
auth        optional    pam_kwallet5.so

account     include     system-login

password    include     system-login

session     optional    pam_keyinit.so          force revoke
session     include     system-login
session     optional    pam_kwallet5.so         auto_start

No change with that though

Last edited by nooobeee (2025-02-07 03:00:31)

Offline

#3 2025-02-07 03:05:57

nooobeee
Member
Registered: 2021-09-17
Posts: 37

Re: Nextcloud auth at login

some potentially relevant info from logs:

Feb 06 20:55:08 g5 sddm-helper[16585]: pam_kwallet5(sddm:auth): pam_kwallet5: pam_sm_authenticate
Feb 06 20:55:08 g5 sddm-helper[16585]: pam_kwallet5(sddm:setcred): pam_kwallet5: pam_sm_setcred
Feb 06 20:55:09 g5 sddm-helper[16585]: pam_kwallet5(sddm:session): pam_kwallet5: pam_sm_open_session
Feb 06 20:55:09 g5 sddm-helper[16592]: pam_kwallet5: final socket path: /run/user/1000/kwallet5.socket
Feb 06 20:55:11 g5 kwalletd6[16593]: kf.wallet.kwalletd: Wallet failed to get opened by PAM, error code is -9
Feb 06 20:55:28 g5 systemd[3354]: Started dbus-:1.2-org.kde.kwalletmanager@6.service.
Feb 06 20:55:28 g5 kwalletmanager5[17717]: Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)

Offline

#4 2025-02-07 03:17:14

nooobeee
Member
Registered: 2021-09-17
Posts: 37

Re: Nextcloud auth at login

I guess a reboot was necessary.  Rebooted and now I did get prompted for the kwallet password.  It worked to prevent the nextcloud prompt.

However now kwallet requires me to put in my password instead of transparently unlocking.  Any thoughts on how to get kwallet to take the password that was entered during login?  I have the same password set for both login and kwallet.

Offline

#5 2025-02-07 03:24:26

nooobeee
Member
Registered: 2021-09-17
Posts: 37

Re: Nextcloud auth at login

updated logs:

Feb 06 21:14:19 g5 sddm-helper[874]: pam_kwallet5(sddm:auth): pam_kwallet5: pam_sm_authenticate
Feb 06 21:14:19 g5 sddm-helper[874]: pam_kwallet5(sddm:setcred): pam_kwallet5: pam_sm_setcred
Feb 06 21:14:19 g5 sddm-helper[874]: pam_kwallet5(sddm:session): pam_kwallet5: pam_sm_open_session
Feb 06 21:14:19 g5 sddm-helper[906]: pam_kwallet5: final socket path: /run/user/1000/kwallet5.socket
Feb 06 21:14:21 g5 kwalletd6[907]: kf.wallet.kwalletd: Wallet failed to get opened by PAM, error code is -9
Feb 06 21:14:22 g5 kwalletd6[907]: Using kwallet without parent window!

still seeing that error code -9.  Maybe that has something to do with it.

Offline

#6 2025-02-07 03:50:00

nooobeee
Member
Registered: 2021-09-17
Posts: 37

Re: Nextcloud auth at login

Deleting the wallet and allowing a new one to be created on the next login resolved the issue.

Offline

Board footer

Powered by FluxBB