nextcloud / desktop

💻 Desktop sync client for Nextcloud
https://nextcloud.com/install/#install-clients
GNU General Public License v2.0
3.05k stars 799 forks source link

[Bug]: kdewallet on Ubuntu 22.04 | Gnome 3 (v42.2) | X11 #4814

Closed DanielBoettner closed 1 month ago

DanielBoettner commented 2 years ago

⚠️ Before submitting, please verify the following: ⚠️

Bug description

Nextclound requesting kdewallet instead of gnome-keyring to store authentication.

Causes extra password dialog on every user login.

Steps to reproduce

Expected behavior

Use default system keyring/wallet

Which files are affected by this bug

I don't know

Operating system

Linux

Which version of the operating system you are running.

Ubuntu 22.04 LTS

Package

Official SNAP package

Nextcloud Server version

23.0.7

Nextcloud Desktop Client version

3.5.4

Is this bug present after an update or on a fresh install?

Updated from a minor version (ex. 3.4.2 to 3.4.4)

Are you using the Nextcloud Server Encryption module?

Encryption is Enabled

Are you using an external user-backend?

Nextcloud Server logs

No response

Additional info

No response

oerkel47 commented 2 years ago

If it helps, I am experiencing the same with the following system:

Mint 20.3/21 Problem was not present in 3.5.2 or 3.5.1 (not sure anymore, sorry) from which I "updated" to 3.5.4.

bilowik commented 2 years ago

Yup, same here as well. Issue for me occurs on versions 3.5.2-3.5.4 for me. Manjaro, Gnome3 with gnome keyring. Also like to note that if I use 3.5.1 to generate the keys, 3.5.2-3.5.4 still won't use them, so it is not only unable to store the keys, but can't retrieve them either potentially.

lucge commented 2 years ago

I had the same problem with Linux Mint 21: with Nextcloud 3.5.4 had to reenter my password in kdewallet after login. This was not the case with Nextcloud 3.5.1 I found a workaround from that web page to unlock automatically kdewallet on login. In my case (linux mint 21 cinnamon with lightdm):

  1. install libpam-kwallet5 and its dependencies (libpam-kwallet-common and socat)
  2. add the following lines to /etc/pam.d/login
auth      optional pam_kwallet5.so
session   optional pam_kwallet5.s0 auto_start force_run

After that my problem was solved

ret2src commented 1 year ago

Hijacking this thread for the Google travelers passing by.

On Arch Linux with Sway as the window manager and no display manager, the following worked for me:

$ pacman -S kwallet-pam libgnome-keyring libsecret seahorse

$ cat /etc/pam.d/login
#%PAM-1.0
auth       [...]
auth       optional     pam_gnome_keyring.so
auth       optional     pam_kwallet5.so
session    [...]
session    optional     pam_gnome_keyring.so auto_start
session    optional     pam_kwallet5.so auto_start force_run

$ cat /etc/pam.d/passwd
#%PAM-1.0
password    [...]
password    optional    pam_gnome_keyring.so

Next, add the following lines to your Sway config to automatically start the GNOME keyring stuff with Sway:

exec dbus-update-activation-environment --all
exec gnome-keyring-daemon --start --components=secrets

Ironically, after signing in to NextCloud Desktop and rebooting, the credentials were stored in GNOME keyring and not in Kwallet, although a prior reboot without the kwallet PAM did not store them to the GNOME keyring 🤷🏻 either GNOME keyring not working the first time was a coincidence or NextCloud Desktop somehow requires the kwallet PAM to interact with GNOME keyring, IDK...

Rello commented 1 month ago

Hello,

thank you for reporting this issue.

This issue was reported long time ago on old versions and we improved a lot since then. If the error shows up again, please open an issue for the current versions.