Re: NM Install fails. dbus?



On Sun, 2006-03-12 at 19:24 -0600, Alejandro Bonilla wrote:
> Also, when clicking on top of it, it will say "no network connections"
> but then show eth1 and my wifi network. And when choosing the Connection
> it won't have permissions to use the file with the data to use a
> network?

NetworkManager has two parts; 1) NetworkManager, and 2) the
"info-daemon".  You've set permissions correctly for a user to
communicate with NetworkManager, but you haven't set permissions for
NetworkManager to communicate with the info-daemon.

NM doesn't store network information or permissions; that's the purpose
of the info-daemon.  It allows an implementation specific (ie GNOME,
KDE, or plain-text) way of storing allowed networks, passphrases/wep
keys, etc.  It's a dbus service too, and it needs correct permissions as
well.  Otherwise you'll never get asked for a key, and NM won't be able
to remember your previous networks.


> Looks like it needs to ask me for the WEP, but never does. Check below.
> 
> Now, is there a way to clean install NM? I mean, remove everything...

Normally your distribution will package it up for you.  What distro are
you using?  In the case of Fedora, there's a concept of a "console" user
(done with a PAM module called pam_console), which has permissions to
modify things like network settings, power saving settings, drive
mounting, etc.  So in Fedora we just allow any user at the console to
talk to NM.  Other distros like Debian do it differently, since they use
separate groups to isolate permissions for individual services.  That's
your problem here; you need to make sure the correct dbus permissions
are set for the method you use to access NetworkManager.

In my case, I have /etc/dbus-1/system.d/NetworkManager.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.NetworkManager"/>

                <allow send_destination="org.freedesktop.NetworkManager"/>
                <allow send_interface="org.freedesktop.NetworkManager"/>
        </policy>
        <policy at_console="true">
                <allow send_destination="org.freedesktop.NetworkManager"/>
                <allow send_interface="org.freedesktop.NetworkManager"/>
        </policy>
        <policy context="default">
                <deny own="org.freedesktop.NetworkManager"/>
                <deny send_destination="org.freedesktop.NetworkManager"/>
                <deny send_interface="org.freedesktop.NetworkManager"/>
        </policy>
</busconfig>

and /etc/dbus-1/system.d/NetworkManagerInfo.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.NetworkManagerInfo"/>

                <allow send_destination="org.freedesktop.NetworkManagerInfo"/>
                <allow send_interface="org.freedesktop.NetworkManagerInfo"/>
        </policy>
        <policy at_console="true">
                <allow own="org.freedesktop.NetworkManagerInfo"/>

                <allow send_destination="org.freedesktop.NetworkManagerInfo"/>
                <allow send_interface="org.freedesktop.NetworkManagerInfo"/>
        </policy>
        <policy context="default">
                <deny own="org.freedesktop.NetworkManagerInfo"/>

                <deny send_destination="org.freedesktop.NetworkManagerInfo"/>
                <deny send_interface="org.freedesktop.NetworkManagerInfo"/>
        </policy>
</busconfig>

The "at_console" thing here in both of them is Fedora/SUSE specific;
Debian and Ubuntu do it slightly differently.

Dan






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]