The OpenVPN plugin for Gnome’s NetworkManager is somewhat broken, at least in various Ubuntu releases. Even with proper configuration it runs into an “NeedSecrets” error although the same command with the same configuration from shell via sudo work’s just fine.
But fear not mighty roadwarrior! Here’s a fix to let the NetworkManager get back to work.
Needless to say that this is just a temporary solution (a fix is in the making), but the only thing you have to do is to add an at_console policy to /etc/dbus-1/system.d/nm-openvpn-service.conf right between the two already existing policies.
<policy user="at_console"> <allow own="org.freedesktop.NetworkManager.vpnc"/> <allow send_destination="org.freedesktop.NetworkManager.vpnc"/> </policy>
Then the file should look like the following:
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> <busconfig> <policy user="root"> <allow own="org.freedesktop.NetworkManager.openvpn"/> <allow send_destination="org.freedesktop.NetworkManager.openvpn"/> </policy> <policy user="at_console"> <allow own="org.freedesktop.NetworkManager.vpnc"/> <allow send_destination="org.freedesktop.NetworkManager.vpnc"/> </policy> <policy context="default"> <deny own="org.freedesktop.NetworkManager.openvpn"/> <deny send_destination="org.freedesktop.NetworkManager.openvpn"/> </policy> </busconfig>
Afterwards simply restart the NetworkManager via “sudo /etc/init.d/NetworkManager restart” and it’ll work. For Solutions for other VPN technologies you may also consider Ubuntu’s Launchpad.
Danke! Puh, ich dachte schon das wird heute gar nichts mehr… echt super, dass Du Dir die Zeit genommen hast, das aufzuschreiben.
Thanks for the fix. It was driving me crazy.
Thank you very much! It works like a charm! Glad you took the time do document this.