OpenVPN cannot remember password with KDE

Hello,
I would like to migrate daily business operations from MS Windows and Mac desktop/laptop to Linux with KDE. One of the requirements is using a corporate VPN, for which OpenVPN is needed.

Unfortunately, I’ve encountered an issue that, despite all my efforts, I cannot resolve. OpenVPN in KDE cannot remember the account password, and as a result, when attempting to start the VPN, a constant message appears on the screen requesting the password. No matter how many times the password is entered, the message continues to appear, the password is not remembered, and the VPN does not start because no password is supplied to it.

With the GNOME environment, this problem does not exist, and after the initial OpenVPN setup, it works perfectly. However, I would like to use KDE, which would be more user-friendly for colleagues who have never worked with Linux and are migrating from Windows.

I tested the top 7 KDE distributions, but the problem persists with all of them. I checked many forums and found that other users have faced the same issue in one way or another. I’ve tried various options, including with KWallet disabled, with a password only for the current user or for all users, with encrypted or unencrypted passwords, with KWallet enabled and all the variations and options for its use. I also read its documentation, but so far, I still can’t use OpenVPN with KDE, and I’m on the verge of giving up on KDE as my working environment. I am attaching some screenshots of the environment and the password request message, which appears continuously, whether the password is entered there or in the main menu with OpenVPN configurations. The password is not remembered and is not passed to the VPN server.

I would appreciate it if someone could help me with advice on how to solve the problem and fully utilize KDE, which is otherwise an excellent working environment.

OpenVPN_5

1 Like

Couple of ideas see if the kwalletmanager package is installed for KDE to be using it. Second the gnome-keyring I think is the one responsible for the gnome side of things, check for it too.

The KWallet Manager is installed, but it is not functioning as expected, unlike gnome-keyring.

I meant install it and see if it works for the VPN, perhaps that is the manager it looks for. It is very easy to have parts of different desktops and programs running in Linux in the different one.

I installed gnome-keyring on KDE/Debian, started the service, it seems that openvpn has made a record in the gnome password manager, but unfortunately, I still have the same problem. Perhaps I haven’t configured something correctly. I will continue to try :thinking:
Thank you very much for the advice and support!

More than likely some daemon that runs while gnome is in operation that takes care of the password requests to it. Now I check it says it is the daemon perhaps it does not get started on login. Open a console and gnome-keyring & I think is what puts it into the background once started so you get control of the console back and it runs. Then try to connect then disconnect a couple of times to see if it does what it is supposed to. If it does then go into the System Settings then Startup and Shutdown Autostart item and add it to list of items to start on login. Logout and back in again to test that it works if it did in the first testing.

Do you use KDE network manager ? What ist you settings at this place ?

I would add I was playing around today with new Kubuntu install and when installing the Skype noticed it brought in the gnome-keyring to use. It has always kept using the password I put in the first time I used it so there is something simple messing it up somehow.

Thanks for the advice! I tested gnome-keyring in a virtual environment with KDE, but again it didn’t work. However, I have my suspicions that the service did not run properly even though I started it. I suspected that the VPN configuration might have a problem, but the same settings in the GNOME and Cinnamon environments work seamlessly. One way is to keep looking for a solution via gnome-keyring, but I can’t understand why kwallet in all Linux distributions I’ve tested doesn’t work as expected.

Yes, I use KDE Network Manager, as you can see from the screenshot. I’ve also tried different types of settings with password preservation for one or all users (encrypted and unencrypted respectively), as well as those variants with kwallet on or off.

You are welcome. Ok let us forget the KDE then as they say around here there is more than one way to skin a cat. Meaning in Linux it is the same multiple ways to do anything you want. A link below to changing the Gnome to look like windows. You say it works perfectly using it so this is what you do, use it and give them the windows experience on it. Oh if wanting/needing to use any KDE programs in that environment simply install them and they will be able to be used too.

Ok, thanks again for the support! Indeed, the GNOME environment can be set to look like Windows. It seems to me that Zorin OS is very interesting, as it also offers a very good integration of Winе for Windows apps. In the meantime I will keep an eye on the next versions of KDE, Plasma 6 is very promising and I hope sooner or later the problem is solved.

Hi again, just FYI it seems the issue we discussed with Openvpn is a bug that was reported to KDE back in 2019. I hope the problem will be addressed in some of the future KDE releases.

The bug: 411512 – VPN passwords are not persisted to kwallet