LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   NetworkManager (https://www.linuxquestions.org/questions/slackware-14/networkmanager-901025/)

scam 09-04-2011 08:41 AM

NetworkManager
 
Hi all,
I've been using wvdial with my mobile broadband connection but decided to try NetworkManager out and I've come across an error. I've installed all the deps (as far as i know) from Slackbuilds and added plugdev,netdev to users group.

bash-4.1$ nm-applet &
[1] 30090
bash-4.1$
** (nm-applet:30090): WARNING **: <WARN> request_name(): Could not acquire the NetworkManagerUserSettings service.
Error: (9) Connection ":1.23" is not allowed to own the service "org.freedesktop.NetworkManagerUserSettings" due to security policies in the configuration file

Any help would be appreciated, thanks. :)

andrewthomas 09-04-2011 09:08 AM

You are having a PolicyKit permissions problem.

Try this:

Quote:

To grant permissions to users in the plugdev group (for example), the system administrator must create the file /etc/polkit-1/localauthority/50-local.d/org.freedesktop.NetworkManager.pkla with the following contents:
Code:

[nm-applet]
Identity=unix-group:plugdev
Action=org.freedesktop.NetworkManager.*
ResultAny=yes
ResultInactive=no
ResultActive=yes

[nm-applet-userSettings]
Identity=unix-group:plugdev
Action=org.freedesktop.NetworkManagerUserSettings
ResultAny=yes
ResultInactive=no
ResultActive=yes



scam 09-04-2011 09:28 AM

Thanks for the reply, I've added that file and rebooted, now I'm getting this when entering nm-applet from console.

bash-4.1$ nm-applet
** Message: applet now removed from the notification area

** (nm-applet:2374): WARNING **: get_all_cb: couldn't retrieve system settings properties: (2) The name org.freedesktop.NetworkManagerSystemSettings was not provided by any .service files.
** Message: applet now embedded in the notification area
** Message: applet now removed from the notification area

** (nm-applet:2374): WARNING **: fetch_connections_done: error fetching system connections: (2) The name org.freedesktop.NetworkManagerSystemSettings was not provided by any .service files.



bash-4.1$ groups
users wheel audio video cdrom plugdev netdev

andrewthomas 09-04-2011 09:40 AM

You do have an /etc/rc.d/rc.networkmanager file, no?

Have you tried to start NetworkManager at boot?

Add

Code:

# To disable networkmanager, chmod rc.networkmanager to 644
if [ -x /etc/rc.d/rc.networkmanager ]; then
  . /etc/rc.d/rc.networkmanager start
fi

to /etc/rc.d/rc.local

and add this to rc.local_shutdown (create if necessary) and chmod +x /etc/rc.d/rc.local_shutdown
Code:

#!/bin/sh

# To disable networkmanager shutdown, chmod rc.networkmanager to 644
if [ -x /etc/rc.d/rc.networkmanager ]; then
  . /etc/rc.d/rc.networkmanager stop
fi

Then reboot and see if your errors persist.

EDIT: You could also try to run:

Code:

# nm-connection-editor
and check "Available to all users" and apply the settings.

You probably also need a valid consolekit session.

x should be launched with ck-launch-session.

You can check with:

Code:

ck-list-sessions
as a user, not root.

You should have an active and local session.


Quote:

lxde@asus-gentoo ~ $ ck-list-sessions
Session1:
unix-user = '1003'
realname = '(null)'
seat = 'Seat1'
session-type = ''
active = TRUE
x11-display = ':0'
x11-display-device = '/dev/tty7'
display-device = ''
remote-host-name = ''
is-local = TRUE
on-since = '2011-09-04T13:50:45.492311Z'
login-session-id = '7'

scam 09-04-2011 10:29 AM

My mistake I didn't start /etc/rc.d/rc.networkmanager after reboot, thanks for help andrewthomas it's working fine now. Although when i create a mobile broadband connection with setup it doesn't show up when i left click, only shows the eth0 device..and won't let me edit that connection.

andrewthomas 09-04-2011 10:51 AM

Did you try this:

Quote:

Originally Posted by andrewthomas (Post 4461135)

Code:

# nm-connection-editor
and check "Available to all users" and apply the settings.


scam 09-04-2011 10:56 AM

Yeah, I went through the nm-connection-editor to set it up, "Available to all users" is grey and unable to click on it. Don't know if that could be the problem?

andrewthomas 09-04-2011 11:49 AM

Quote:

To grant permissions to users in the plugdev group (for example), the system administrator must create the file /etc/polkit-1/localauthority/50-local.d/org.freedesktop.NetworkManager.pkla with the following contents:
Code:

[nm-applet]
Identity=unix-group:plugdev
Action=org.freedesktop.NetworkManager.*
ResultAny=yes
ResultInactive=no
ResultActive=yes

[nm-applet-userSettings]
Identity=unix-group:plugdev
Action=org.freedesktop.NetworkManagerUserSettings
ResultAny=yes
ResultInactive=no
ResultActive=yes


try adding this to the above file


Code:

[org.freedesktop.network-manager-settings.system.modify]
Identity=unix-group:plugdev
Action=org.freedesktop.network-manager-settings.system.modify
ResultAny=no
ResultInactive=no
ResultActive=yes

You may have to re-boot after making changes.

scam 09-04-2011 12:03 PM

I added that to the file but still the same after reboot, I've tried the command 'ck-list-sessions' which doesn't give me any output. I killed X and tried starting it with
ck-launch-session startfluxbox but wouldn't start up with that command.

dive 09-04-2011 12:12 PM

What I did was:

start rc.networkmanager
Run nm-applet as root and edit the connections (didn't know there was a connection editor)
Made my wifi connection a permanent one available for all users.
Kill nm-applet
Start nm-applet as user

Added this to rc.local:

nmcli con up uuid 0b1486b8-4a7b-4bea-ae6d-10390d898619 1>/dev/null 2>&1 &

After finding the uuid so it connects on boot.

scam 09-04-2011 12:31 PM

Thanks for that dive, it works on my ethernet device but for some reason it doesn't work on my mobile broadband modem. Maybe I'm not editing it right, it just doesn't save it, this is what i get from the console (running at root) nm-applet

http://pastebin.com/xneGf8f8

dive 09-04-2011 12:50 PM

Hmm does the connection show when you rightclick on the systray icon and edit connections? Mine tend to show up with 'Auto $IFACE'

I've not had to set up a mobile broadband connection yet so can't really help in that area.

scam 09-04-2011 12:57 PM

I might have worded that wrong, it shows up when you right click to check or add a connection after saving it but doesn't show on left click on the networkmanager icon. Probably a bash script for stopping and starting wvdial for my fluxbox menu might have been easier, but would like solve this problem.

dive 09-04-2011 01:00 PM

One of the things I had to do was edit out the 'Auto' in the name so it would be permanent.

scam 09-04-2011 01:18 PM

Don't understand it dive, both config files are there /etc/NetworkManager/system-connections/ (eth0 and my mobile broadband) but only ethernet device showing when I left click on the icon. I commented out the 'Auto' in the file too.


All times are GMT -5. The time now is 08:06 PM.