Binary Talks

How to fix NetworkManager’s OpenVPN plugin in Ubuntu 9.04

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.

Share and Enjoy:
  • del.icio.us
  • Digg
  • Slashdot
  • Google Bookmarks
  • LinkedIn
  • StumbleUpon
  • Reddit
  • Yigg
  • Netvibes
  • MisterWong
  • Facebook
  • HackerNews
  • Identi.ca
  • FriendFeed
  • NewsVine

3 Comments

speak up

Add your comment below, or trackback from your own site.

Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

*Required Fields