LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Not authorized to control networking in SSH console (http://www.linuxquestions.org/questions/linux-software-2/not-authorized-to-control-networking-in-ssh-console-846474/)

wichiff 11-25-2010 06:59 AM

Not authorized to control networking in SSH console
 
I want to control Network manager from the command-line. This worked well enough in Ubuntu 10.04 (with cnetworkmanager, nmcli is another possible choice).

Since the upgrade to Ubuntu 10.10 however, a DBus exception is raised when I attempt to activate a connection from within a SSH terminal:
Code:

org.freedesktop.NetworkManager.PermissionDenied: Not authorized to control networking.

foodown 11-26-2010 12:13 AM

What user are you logged in as?

wichiff 11-26-2010 05:05 AM

A user who is administrator.
When the command is issued while he is logged in gnome, there is no authorization problem.
When he tries it from another machine over SSH (logged into the same account), it fails since the upgrade to 10.10

foodown 11-26-2010 08:07 PM

Quote:

Originally Posted by wichiff (Post 4171623)
A user who is administrator.
When the command is issued while he is logged in gnome, there is no authorization problem.
When he tries it from another machine over SSH (logged into the same account), it fails since the upgrade to 10.10

It sounds like the user is not a member of the right groups.

In most distributions, desktop users who log in directly to the machine are automatically given the privileges of several groups. When logging in remotely, these privileges are not granted unless the user is actually a member of those groups.

What groups is the user a member of?

wichiff 11-27-2010 06:53 AM

groups User:
adm dialout fax cdrom floppy tape audio dip video plugdev fuse lpadmin netdev admin sambashare davfs2

The list is in the same in SSH terminal as in Gnome terminal.

foodown 11-27-2010 08:30 PM

Have you seen this?

https://bbs.archlinux.org/viewtopic.php?id=63576

wichiff 11-28-2010 05:44 AM

Have seen something similar a couple of days ago, and added this to /etc/dbus-1/system.d/NetworkManager.conf:
Code:

        <policy group="network">
                <allow send_destination="org.freedesktop.NetworkManager"/>
                <allow send_interface="org.freedesktop.NetworkManager"/>
        </policy>

This does not solve the problem.

As to starting nm-applet from the command-line, it works -- including from the ssh console, provided I export DISPLAY=:0.0

foodown 11-28-2010 11:00 AM

According to your answer about the groups the user is in, they are not a member of the "network" group.

Quote:

groups User:
adm dialout fax cdrom floppy tape audio dip video plugdev fuse lpadmin netdev admin sambashare davfs2
Also, according to the XML you just posted, the network group is the one that they need to be in.

Quote:

<policy group="network">
Have you tried adding them to this group?

wichiff 11-28-2010 11:48 AM

Good idea, but:
Code:

adduser: The group `network' does not exist.

wichiff 12-12-2010 04:37 PM

The connection can be activated with root privileges (`sudo nmcli').
I can't figure out how to edit
Quote:

/etc/dbus-1/system.d/NetworkManager.conf
to let one user control networking from the command-line. Do I need to edit the policy context="default" block ?


All times are GMT -5. The time now is 10:29 AM.