NetworkManager: openvpn secrets error

Today I tried to set up my openvpn connection through NetwokManger (for instance, I’m using Ubuntu 10.10).

I imported my ovpn files (perfectly working on windows) with the NM gui without errors. Then, when I started the vpn, I got the error message: “No valid secrets”!

Looking at syslog file i found this error line:

[1297693509.445619] [nm-vpn-connection.c:844] connection_need_secrets_cb(): NeedSecrets failed: dbus-glib-error-quark Rejected send message, 1 matched rules; type="method_call", sender=":1.4" (uid=0 pid=1129 comm="NetworkManager) interface="org.freedesktop.NetworkManager.VPN.Plugin" member="NeedSecrets" error name="(unset)" requested_reply=0 destination="org.freedesktop.NetworkManager.openvpn" (uid=0 pid=8646 comm="/usr/lib/network-manager-openvpn/nm-openvpn-servic"))
What you have to do to solve this issue is to edit your /etc/dbus-1/system.d/nm-openvpn-service.conf and add these lines inside the busconfig tag:

<policy user="at_console"> <allow own="org.freedesktop.NetworkManager.vpnc"/> <allow send_destination="org.freedesktop.NetworkManager.openvpn"/> </policy> (Thanks to Mauro for the correction)

<policy user="at_console"> <allow own="org.freedesktop.NetworkManager.openvpn"/> <allow send_destination="org.freedesktop.NetworkManager.openvpn"/> </policy>

I think that the same problem can be found in other NM’s plugins like pptp or vpnc and can be resolved in the same way editing the corresponding .conf file.
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.