Linux client does not save password, always authorizes through the browser

Hello Community, this my first post around here because owncloud worked like a charm on my two windows devices and my Linux Mint xfce device... I hope you can help me solving my problem :slight_smile:

Expected behaviour

Owncloud should ask for password and username once and then store them.

Actual behaviour

After a reboot of the computer the client always wants to authorizes through the browser. (When setting up the client, It did not ask me for username or password, only for the server address).
There is an entry in my kdewallet (Contents tab) but in the Applications tab there is an entry only in the upper field ("These applications are currently connected to this wallet") and not the lower one ("These applications are authorized to acess this wallet"). This is weird, because I actually granted access to owncloud multiple times.
Syncing of my folders works fine once authorized.

Steps to reproduce

  1. (Re)boot the computer
  2. (start the owncloud client/wait for it to start)

Server configuration

I do not know any of this since my university is hosting the server.
Operating system:

Web server:

Database:

PHP version:

ownCloud version:

Storage backend (external storage):

Client configuration

Client version: Version 2.4.1 (build 9083)

Operating system: Linux Mint 18.3 KDE Plasma 5.8.9

OS language: EN

Qt version used by client package (Linux only, see also Settings dialog): Built from Git revision cd60c2 on Mar 30 2018, 23:14:44 using Qt 5.6.2, OpenSSL 1.0.2g 1 Mar 2016

Client package (From ownCloud or distro) (Linux only): owncloud-client (Version 2.4.1-9083

1 Like

Thank you for posting! Confirming I have the same issue. It is very annoying because it always opens a new web browser tab.

I am having this issue for a while now (maybe half a year) and I do not remember when it started. But I recently freshly set up my PC, so I was to research this problem at last.

Client version: 2.4.1+dfsg-1 on Ubuntu 18.04

Have you both tried to search on the bug tracker of the sync client for this issue? Maybe you can find some notes or workarounds posted there?

1 Like

I actually found many issues on GitHub related to storing passwords.

Show list
  • 5703
  • 6304
  • 5750
  • 5761
  • 5280
  • 6335
  • 6455

Edit: 6455 describes the solution that works for me, which is to manually install the package libgnome-keyring0.

2 Likes

I stumbled across this paragraph in the ownCloud documentation:

Linux users must also have a password manager enabled, such as GNOME Keyring or KWallet, so that the sync client can login automatically.

Unfortunately, they do not include a detailed instruction on how to do that.

On my system, Ubuntu 18.04, there is a preinstalled password manager called Seahorse. I cannot find any entry for ownCloud in there, so it did not create one automatically.

If anyone understands how to correctly store the password in there, I would appreciate your help.

libgnome-keyring was not installed by default, and seems to be required.

To fix, simply pull up a terminal and type

sudo apt-get install libgnome-keyring-common

2 Likes

Thank you @Robert_Grantham for your quick response! I have installed libgnome-keyring-common using the above command. (The funny thing is, the package seahorse depends on gnome-keyring but not on libgnome-keyring-common.)

That seems to automatically store the password. (But I still cannot see an entry in Seahorse.) However, it still does not completely work as expected.

Now, when I start ownCloud, it still opens a browser tab and asks for authorisation. The difference is, I do not have to specify my password. (See images below.)

Is there any way to suppress this behaviour?

See first screenshot

See second screenshot

Sorry, I am only allowed to upload one screenshot. The second screenshot just says: “The application was authorized successfully. You can now close this window.”

Edit: I have to back up a little bit. The password is only remembered until I log out of the Ubuntu session. So it remembers the password when restarting the program but not when restarting the PC.

Edit 2: Turns out, this is a Wayland problem. It works fine when using the X display server. For a workaround for Wayland, I had to run this command: export GSM_SKIP_SSH_AGENT_WORKAROUND=1 (source)

Sorry @Fresh_Dumbledore for taking over your thread. I was thinking we may be affected by the same bug. You said below that you already have all mentioned packages. But did you install gnome-keyring, or the KDE equivalent kwallet? See also here: github.com/frankosterfeld/qtkeychain/issues/45

1 Like

Great catch about the missing dependency, i think this looks like something you might want to report to the maintainer of your used linux distro / packages.

The screenshot looks to me as expected, it seems your hosting provider has enabled Oauth2 authentication.

1 Like

I already had alle the mentioned packages, thats why I think it is a problem with the client.

@tom42 Why is it working on my Windows machines then?

I don't think that you can compare the windows and the linux clients, those are probably using completely different methods to save the password (I think something something like e.g. seahorse/gnome-keyring doesn't exist on windows).

I'm going to install Linux Mint in my laptop to reproduce the issue...I'm confident I going to have good news for you in 48 hours.

1 Like

When the desktop app tries to auth through the browser, it probably uses Oauth2 as the authentication path, instead of the locally stored password. Please try to disable the Oauth2 app in your owncloud installation, this should force the client to use the local password, e.g. from gnome keyring or KDE kwallet

This is inaccurate: sync client's OAuth2 integration is not orthogonal with the keychain component on your OS. The client does actually store there the refresh token that is used to grant a new auth. token and (like the user password) keep itself authorized. Disabling OAuth2 on the server should not cause the client to behave differently in this scenario.

well, on my 10.0.8 it does behave like this. Disabling Oauth2 causes the 2.4.1 client to use the local kwallet password on startup. In my case it is KDE (OpenSUSE Leap 423), which should be more or less the same as the Mint/Gnome scenario described here

Hello Robert,

Could you reproduce that? I have this problem since I have installed Linux Mint 19 Cinnamon
On Linux Mint 18.3 everything worked fine.

In Ubuntu 18:04 you have to install
gnome-keyring (should be installed by default)
python-keyring (is essential for onwCloud)

Open a terminal (STRG+ALT+t)

sudo apt install gnome-keyring

(if it is installed, this would NOT harm in any way, you get an answer, that it is allready installed)

AND
sudo apt install python-keyring

This should do it

1 Like