LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-25-2010, 06:59 AM   #1
wichiff
LQ Newbie
 
Registered: Jul 2010
Distribution: Ubuntu
Posts: 19

Rep: Reputation: 0
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.
 
Old 11-26-2010, 12:13 AM   #2
foodown
Member
 
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 609

Rep: Reputation: 218Reputation: 218Reputation: 218
What user are you logged in as?
 
Old 11-26-2010, 05:05 AM   #3
wichiff
LQ Newbie
 
Registered: Jul 2010
Distribution: Ubuntu
Posts: 19

Original Poster
Rep: Reputation: 0
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
 
Old 11-26-2010, 08:07 PM   #4
foodown
Member
 
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 609

Rep: Reputation: 218Reputation: 218Reputation: 218
Quote:
Originally Posted by wichiff View Post
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?
 
Old 11-27-2010, 06:53 AM   #5
wichiff
LQ Newbie
 
Registered: Jul 2010
Distribution: Ubuntu
Posts: 19

Original Poster
Rep: Reputation: 0
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.
 
Old 11-27-2010, 08:30 PM   #6
foodown
Member
 
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 609

Rep: Reputation: 218Reputation: 218Reputation: 218
Have you seen this?

https://bbs.archlinux.org/viewtopic.php?id=63576
 
Old 11-28-2010, 05:44 AM   #7
wichiff
LQ Newbie
 
Registered: Jul 2010
Distribution: Ubuntu
Posts: 19

Original Poster
Rep: Reputation: 0
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
 
Old 11-28-2010, 11:00 AM   #8
foodown
Member
 
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 609

Rep: Reputation: 218Reputation: 218Reputation: 218
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?

Last edited by foodown; 11-28-2010 at 11:08 AM.
 
Old 11-28-2010, 11:48 AM   #9
wichiff
LQ Newbie
 
Registered: Jul 2010
Distribution: Ubuntu
Posts: 19

Original Poster
Rep: Reputation: 0
Good idea, but:
Code:
adduser: The group `network' does not exist.
 
Old 12-12-2010, 04:37 PM   #10
wichiff
LQ Newbie
 
Registered: Jul 2010
Distribution: Ubuntu
Posts: 19

Original Poster
Rep: Reputation: 0
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 ?

Last edited by wichiff; 12-12-2010 at 04:39 PM.
 
  


Reply

Tags
commandline, dbus, networking, ssh


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh authorized keys from one directory to another directory did not worked tkmsr Linux - Software 4 10-25-2010 08:28 AM
The difference in settings: console from desktop & ssh as DISPLAY not set when ssh in wikapuki Linux - Newbie 10 07-02-2010 09:44 AM
SSH/PAM non-authorized login attempts: print default message kenneho Linux - Security 0 01-08-2009 08:42 AM
console bittorrent client / ssh control Landoln Linux - Software 2 07-16-2006 02:02 AM
control remote console mritch Linux - Networking 1 08-01-2004 09:22 AM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration