[NM 0.7 - intrepid] DHCP org.freedesktop.Dbus.Error.AccessDenied

Bug #262817 reported by Alex Ruddick
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: network-manager

I have never had this problem before, although the last time I connected to this (WEP+TTLS+PAP) network was with 0.65.

nm-applet shows 2 green globes, and the console indicated that it received a DHCP address:

"DHCPDISCOVER ..,
DHCPOFFER ...
DHCPREQUEST....
DHCPACK ...
Error: Could not acquire the NM DHCP client service. Message: (org.freedesktop.DBus.Error.AccessDenied) Connection ":1.57" is not allowed to own the service "org.freedesktop.nm_dhcp_client" due to security policies in the configuration file."

Eventually nm-applet times out and asks for the key again.

When I edited /etc/dbus-1/system.d/nm-dhcp.conf" the policy for user="dhcp" was allow/allow. For "context=default" it was deny/deny. I changed that to allow/allow and NetworkManager connected.

Revision history for this message
Alex Ruddick (alexrudd0) wrote :

Adding both myself and root to the group "dhcp" did work. The only way I can connect is to allow "context=default" Is NM being run as the wrong user perhaps? I used sudo.

Revision history for this message
Alexander Sack (asac) wrote :

/etc/dbus-1/system.d/nm-dhcp.conf -> should have user="root" ... and thats what we ship in intrepid (otherwise there would be more complains.

If you dont have that you most likely modified that file in the past.

Changed in network-manager:
status: New → Invalid
Revision history for this message
TJ (tj) wrote :

Alexander, this affects the PPA 0.7~~svn20080928t225540+eni0-0ubuntu2~nm3~hardy1 package.

I'd been using my own variation of the 0.7 package but yesterday allowed it to upgrade to the network-manager PPA version. A few hours later after a system restart neither the wired or wireless interfaces could get a connection using NetworkManager.

I added an fprintf() to nm-dhc-client-action.c:main(), built, and installed. Then I renamed

/usr/lib/NetworkManager/nm-dhcp-client.action
 to
/usr/lib/NetworkManager/nm-dhcp-client.action.exe

and created a shell script in its place that sets up logging and then calls the original binary:

#!/bin/bash
exec >> /tmp/dhclient-debug.log 2>&1
set -x
/usr/lib/NetworkManager/nm-dhcp-client.action.exe
echo "exit code=$?"

The log reported:

+ /usr/lib/NetworkManager/nm-dhcp-client.action.exe
nm-dhcp-client-action.c::main(1, '/usr/lib/NetworkManager/nm-dhcp-client.action.exe')
Error: Could not acquire the NM DHCP client service. Message: (org.freedesktop.DBus.Error.AccessDenied) Connection ":1.4688" is not allowed to own the service "org.freedesktop.nm_dhcp_client" due to security policies in the configuration file
+ echo 'exit code=1'
exit code=1

The contents of /etc/dbus-1/system.d/nm-dhcp-client.conf on the system (and in the .deb) were:

<!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="dhcp">
                <allow own="org.freedesktop.nm_dhcp_client"/>
  <allow send_interface="org.freedesktop.nm_dhcp_client"/>
        </policy>
        <policy context="default">
                <deny own="org.freedesktop.nm_dhcp_client"/>
  <deny send_interface="org.freedesktop.nm_dhcp_client"/>
        </policy>
</busconfig>

Before I found this bug report I then tried adding:

        <policy user="root">
                <allow own="org.freedesktop.nm_dhcp_client"/>
  <allow send_interface="org.freedesktop.nm_dhcp_client"/>
        </policy>

and restarted dbus.

NetworkManager immediately worked correctly.

Revision history for this message
TJ (tj) wrote :

Marking as 'new' to flag this up for the network-manager PPA hardy packages.

Changed in network-manager:
status: Invalid → New
Revision history for this message
Alberto (apedraza) wrote :

Jut upgraded to Ibex. I can confirm this bug. As soon as I added the policy for root, everything worked. I was using NM 0.7 on Hardy before.

It is worth mentioning that this bug affects wired and wireless.

Revision history for this message
Armin Ronacher (mitsuhiko) wrote :

I can confirm that bug on the notebook of a friend of mine. It's reproducible. If network manager 0.7 (from the ppa) is installed on the system and you upgrade to intrepid the file says "dhcp" instead of "root". Because quite a few people have used the unofficial packages for the network manager 0.7 in the past i would propose changing that value in the upgrade script.

Revision history for this message
Miłosz Kosobucki (mikom) wrote :

I just updated my laptop to Intrepid and this bug is still present. It looks like a major blocker for me

Revision history for this message
Alexander Sack (asac) wrote :

this happens when you edited your /etc/dbus/system.d files manually once. not a bug. properly clean your changes and get the maintainer shipped config files in place should fix that for you.

Changed in network-manager:
status: New → Invalid
Revision history for this message
Kristoffer Lundén (kristoffer-lunden) wrote :

I have this same issue. Updated a machine from Hardy and Networkmanager died, or rather DHCP. Managed to get online with hard coded IPs and find this report. :)

"properly clean your changes and get the maintainer shipped config files in place" is not much of an instruction though, especially since I haven't edited those files, ever, even though I suppose some package I installed during hardy might have.

Anyway, adding the root entry seems to fix it. Is there a better way to properly clean and getting in place?

Revision history for this message
Alexander Sack (asac) wrote :

please check /etc/dbus-1/system.d/nm-dhcp-client.conf ... if there is user="dhcp" then you modified that file manually once. change that to "root" ... or --purge network-manager and install again.

Revision history for this message
Alex Ruddick (alexrudd0) wrote :

I have never touched that file (before fixing it); why would I? My system is fine now and I think all other people cc'd to this bug have fixed it also.

The problem is that somehow the file was changed, and we are concerned that whatever caused it gets fixed. If none of us manually changed the file, then it *is* a bug. It may be (1)obselete (2)not very widespread (3)caused by using a PPA, but it's still a bug. Please don't try to blame it on user modifications.

Revision history for this message
Alexander Sack (asac) wrote :

not sure why that would have changed for you. current NM definitly ships root as the dhcp user. if thats not the case for you something must have modified your file in the past. Maybe it was you trying something or some script ... hard to track down if we cannot reproduce it.

Maybe a plan would be to install hardy and upgrade to intrepid. if that doesnt reproduce it, try to install
gutsy and upgrade to hardy and upgrade to intrepid ... if still no luck start with feisty ;) .... and so on.

Revision history for this message
djnet (djnet) wrote :

Hi,

The facts:
--------------
yesterday i'd setup a new hardy system, dhcp and internet access worked out of the box

then, i used knetwork manager to configure another (not working) adsl modem
--> here network manager may have updated config files

i switched back to the working adsl modem, dhcp was still working

Big problem appears after upgrading to intrepid : DHCP didn' work anymore
--> i check my nm config file: i had the expected value : user="root" , problem wasn't here !
--> i switched back to hardy network manager (using a little set of .deb files : libnm, networkstatus, network-manager , network-manager-kde ..) -> DHCP works again :)

I can confirm:
 - my problem wasn't due to manual modification of network manager config files (setup hardy, upgrade to intrepid on the same day) !
 - it looks like an issue of networkmanager configuration ( either a hardy network manager problem; or an upgrade problem)

PS: i'm using kubuntu but the problem seems not restricted to that flavour of ubuntu ..

Revision history for this message
Miguel Ruiz (mruiz) wrote :

Hi all,

Today I upgraded my laptop from Hardy to Intrepid, and I want to confirm this issue (NM is buggy)

As Alexander explained before, the problem is the user under nm configuration file.

After the upgrade:

mruiz@phoenix:~$ cat /etc/dbus-1/system.d/nm-dhcp-client.conf
<!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="dhcp">
                <allow own="org.freedesktop.nm_dhcp_client"/>
                <allow send_interface="org.freedesktop.nm_dhcp_client"/>
        </policy>
        <policy context="default">
                <deny own="org.freedesktop.nm_dhcp_client"/>
                <deny send_interface="org.freedesktop.nm_dhcp_client"/>
        </policy>
</busconfig>

Then, I had to reinstall network-manager ... and voilá!

mruiz@phoenix:~$ cat /etc/dbus-1/system.d/nm-dhcp-client.conf
<!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.nm_dhcp_client"/>
  <allow send_interface="org.freedesktop.nm_dhcp_client"/>
        </policy>
        <policy context="default">
                <deny own="org.freedesktop.nm_dhcp_client"/>
  <deny send_interface="org.freedesktop.nm_dhcp_client"/>
        </policy>
</busconfig>

Everything works good now.

Cheers!

Revision history for this message
Aaron Roydhouse (aaron-roydhouse) wrote :

I can confirm the same problem just upgraded a stock 8.04 Hardy with Network Manager 0.7 to 8.10 Intrepid. My wired and wireless networking stopped working. DHCP wasn't working for any interface. DHCP worked fine before the upgrade.

I was able to manually configure a network interface, but was then blocked from reinstalling 'network manager' by 'network manager' itself claiming I was still 'offline' (the same thing that network manager uses to screw up bluetooth networking and firefox/thunderbird).

After reading this bug: By changing the user from 'dhcp' to 'root' in the '/etc/dbus-1/system.d/nm-dhcp-client.conf' I was able to get DHCP going again.

Like the rest of us with this problem I have certainly never edited or even heard of the '/etc/dbus-1/system.d/nm-dhcp-client.conf' file.

Upgrading to 8.10 has been a huge disaster/regression for networking particularly for netbook users (most problems have been related to drivers used in the market leading netbooks like ASUS and Acer). I've just spent hours reading many many web pages and forum posts from the many suffering Ubuntu users who upgraded and found their networking stopped working, PPTP stopped working, DHCP stopping working, and a few other problems. Then, with no working network, they have extra problems trying to restore their systems. I read several angry venting people say they are giving up on Ubuntu completely and going back to XP. That's sad for all the hard work the Ubuntu team and community put in. 8.10 may have many improvements but I think it has been a net set-back for the Ubuntu/Linux community.

Some sort of bold warning about the networking regressions should be added to the upgrade process or a fix applied to 8.10 otherwise more Ubuntu users will suffer if they upgrade their Hardy installations. Even if just a warning to wait for Jaunty or something.

Aaron.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.