Hello experts,
I’m currently facing an issue while trying to set up a VPN using NetworkManager on my system. When I check the status of NetworkManager with ‘systemctl status NetworkManager’, I encounter the following error:
In an attempt to resolve this issue, I’ve made some changes to the polkit settings. Specifically, I added the following line to /etc/polkit-default-privs.local:
This did not help, so I removed then tried creating a custom policy in /etc/polkit-1/localauthority/50-local.d/50-networkmanager-custom.pkla with the following content:
[Let foo modify system settings for network]
Identity=unix-user:foo
Action=org.freedesktop.NetworkManager.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes
Despite these changes, I am still encountering the “Insufficient privileges” error when trying to add a connection through NetworkManager.
Any assistance or guidance would be greatly appreciate on how to correctly set up VPN connections with NetworkManager.
Thank you in advance!
Do not make large stories by telling “When I check the status of NetworkManager with ‘systemctl status NetworkManager’, I encounter the following error:”. Just copy/paste all lines involved: the prompt/command line, ALL output lines, the next prompt line.
It is the easiest and best way to show others what you saw within it’s context.
After logging in then attempting to setup fastest connection:
$ protonvpn-cli connect -f
Setting up Proton VPN.
An unknown error has occured. Please ensure that you have internet connectivity.
If the issue persists, please contact support.
Tumbleweed is not Leap, location of this file changed. Read comments in /usr/etc/polkit-default-privs/local.template for explanation how to create local overrides. In any case, you need to run additional command for the changes to become effective. Just editing this file is not enough. Which is also explained in the comments.
Do not use Ubuntu documentation for openSUSE. Ubuntu is using “frozen” version of polkit. openSUSE follows upstream and switched to JavaScript based rules. Read man 8 polkit, it contains multiple examples how to create your custom rules.
Modification of own connections is allowed by default. Are you sure that is what your application does? I suspect it tries to add system connection.
You need to run this command only after you created/modified /etc/polkit-default-privs/local. The rules should be effective immediately. You could try restarting polkit, but I am pretty sure the action is different.
You could start with allowing everything that begins with org.freedesktop.NetworkManager. and see if it helps.