NetworkManager Over RDP
Using a Debian VM over RDP
I did not find a suitable answer to this elsewhere, so I’ve decided to document it here - How do you correctly use NetworkManager in a Debian VM when you’re accessing it over RDP? For this example it is a Debian VM using XFCE and let’s assume you’ve installed the OpenVPN plugin using
|
|
From an otherwise clean install, you could access the OpenVPN plugin from the widget on the panel and you’ll see, as expected:
However in any of the editing windows the inputs as well as the ‘save’ button will remain grayed out:
The same behavior is true throughout NetworkManager - its not possible to modify an entry even if you’re logged in as an ‘administrative’ user with sudo access:
PolKit
After fumbling around a bit and a lot of failed googling - I figured out this is due to default PolKit behavior for NetworkManager when accessing it ‘remotely’. In this case RDP is considered ‘remote’.
To override this behavior and not loose the modification after an update, copy the configuration file to /etc
where it will override the system defaults:
|
|
Inside this file, you’ll see three ‘Result’ values including ResultAny, ResultInactive, and ResultActive. The ResultInactive and ResultActive values are only used when a user is logged in locally over a console. The ResultAny is used any time including if the user is logged in ‘remotely’ in this case, over RDP.
Change ‘ResultAny’ from ’no’ to ‘auth_admin’.
Able to modify NetworkManager over RDP
With that change, it’s now possible to modify and add NetworkManager settings such as a VPN profile:
Now, when you click save (and assuming you have sudo group as shown in the .pkla file), it will prompt you to authenticate and then save the changes:
Comments
You can use your Fediverse (i.e. Mastodon, among many others) account to reply to this post.