I have Ubuntu 13.04 Gnome with Mate.
If I click on the networking icon on the top tool bar and try to do something like add a never before used Wifi or simply click Hardwire Connection 1 when I have changed to a new network, I get ‘Connection activation failed. (32) Not authorized to control networking.’
My presumption is that I have lacking some group attribute for my user or else there is some security setting.
I can make the changes if I log in as root instead of myself.
What must be tweaked to allow my user name the privileges to handle this?
asked Jun 4, 2013 at 23:08
To fix this problem, it should be enough to add your user to the network or netdev group. To do it, you can use the GUI in the settings menu (that cog in the top right), or just type something like this in a terminal:
sudo usermod -G netdev -a yourusername
Remember to logout/login again to update your user privileges.
Eliah Kagan
115k53 gold badges311 silver badges484 bronze badges
answered Jun 5, 2013 at 0:46
gerlosgerlos
2,5441 gold badge19 silver badges24 bronze badges
9
In my case, I did not have the privileges. So, either log in as root if using the GUI, or use sudo when using terminal.
answered Feb 6, 2021 at 6:59
Pe DroPe Dro
1472 silver badges10 bronze badges
It has been a while, but I ran into this problem while updating to 14.04. In my case the problem was with the lxdm display manager. Try switching your display managers by running
sudo dpkg-reconfigure lxdm
If you don’t have other manager install try something like GDM:
sudo apt-get install gdm
answered Jul 4, 2014 at 0:30
dentendenten
1411 silver badge7 bronze badges
I have Ubuntu 13.04 Gnome with Mate.
If I click on the networking icon on the top tool bar and try to do something like add a never before used Wifi or simply click Hardwire Connection 1 when I have changed to a new network, I get ‘Connection activation failed. (32) Not authorized to control networking.’
My presumption is that I have lacking some group attribute for my user or else there is some security setting.
I can make the changes if I log in as root instead of myself.
What must be tweaked to allow my user name the privileges to handle this?
asked Jun 4, 2013 at 23:08
To fix this problem, it should be enough to add your user to the network or netdev group. To do it, you can use the GUI in the settings menu (that cog in the top right), or just type something like this in a terminal:
sudo usermod -G netdev -a yourusername
Remember to logout/login again to update your user privileges.
Eliah Kagan
115k53 gold badges311 silver badges484 bronze badges
answered Jun 5, 2013 at 0:46
gerlosgerlos
2,5441 gold badge19 silver badges24 bronze badges
9
In my case, I did not have the privileges. So, either log in as root if using the GUI, or use sudo when using terminal.
answered Feb 6, 2021 at 6:59
Pe DroPe Dro
1472 silver badges10 bronze badges
It has been a while, but I ran into this problem while updating to 14.04. In my case the problem was with the lxdm display manager. Try switching your display managers by running
sudo dpkg-reconfigure lxdm
If you don’t have other manager install try something like GDM:
sudo apt-get install gdm
answered Jul 4, 2014 at 0:30
dentendenten
1411 silver badge7 bronze badges
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 D-Bus exception is raised when I attempt to activate a connection from within a SSH terminal:
org.freedesktop.NetworkManager.PermissionDenied:
Not authorized to control networking.
It may have to do with /etc/dbus-1/system.d/NetworkManager.conf; where else to look for a clue ?
This issue occurs only when I am ssh‘d into the machine;
in a gnome session I don’t get the same issue — with the same (admin) user account in both cases.
asked Dec 6, 2010 at 18:42
On more recent Ubuntu’s this is control by the polkit.
make new file: /etc/polkit-1/localauthority/50-local.d/allow-ssh-networking.pkla
Add:
[Let adm group modify system settings for network]
Identity=unix-group:adm
Action=org.freedesktop.NetworkManager.network-control
ResultAny=yes
Then restart the polkit service. (Make sure your user is in the adm group)
You can find a list of valid NetworkManager actions on your system with pkaction | grep NetworkManager
More info: https://forums.fedoraforum.org/showthread.php?276493-Remotely-starting-a-VPN-connection-does-not-work
answered Aug 31, 2018 at 4:59
4
By default, DBus only allows root and users sitting at the physical console to control networking settings.
This can be changed by editing DBus policy files, in this case /etc/dbus-1/system.d/NetworkManager.conf
answered Dec 6, 2010 at 20:28
user1686user1686
401k59 gold badges846 silver badges916 bronze badges
3
Polkit v122 uses javascript for rule files, INI syntax was deprecated. This worked for me:
/* Allow adm group to use nmcli con up/down over ssh */
polkit.addRule(function(action, subject) {
if (subject.isInGroup("adm") && (
action.id === "org.freedesktop.NetworkManager.enable-disable-network"
|| action.id === "org.freedesktop.NetworkManager.network-control"
)
) {
return polkit.Result.YES;
}
})
— placed as /etc/polkit-1/rules.d/authorize-ssh-nmcli.rules; systemctl restart polkit to apply.
answered Nov 30, 2022 at 13:53
ulidtkoulidtko
2,86624 silver badges20 bronze badges
I wrote a combination .sh and .exp scripts that:
- activate vpn connection
- connect to remote server
- download some files from server
- deactivate vpn connection
This scripts should run on schedule.
I use nmcli for activate and deactivate connections.
If I run scripts manually it work correctly, but if I run this scripts via cron, I receive message (about vpn conn activation): Error: Connection activation failed: Not authorized to control networking.
In logs I see that the script is run from under me:
Dec 6 18:48:01 maskalev-Aspire-A514-54 CRON[10975]: (maskalev) CMD (./dev/promomed/__DRAFTS__/utils/sftp_monitor/main.sh)
my groups:
maskalev@maskalev-Aspire-A514-54:~$ groups
maskalev root adm cdrom sudo dip plugdev netdev lpadmin lxd sambashare docker
nmcli permissions
maskalev@maskalev-Aspire-A514-54:~$ nmcli general permissions
PERMISSION VALUE
org.freedesktop.NetworkManager.checkpoint-rollback auth
org.freedesktop.NetworkManager.enable-disable-connectivity-check yes
org.freedesktop.NetworkManager.enable-disable-network yes
org.freedesktop.NetworkManager.enable-disable-statistics yes
org.freedesktop.NetworkManager.enable-disable-wifi yes
org.freedesktop.NetworkManager.enable-disable-wimax yes
org.freedesktop.NetworkManager.enable-disable-wwan yes
org.freedesktop.NetworkManager.network-control yes
org.freedesktop.NetworkManager.reload auth
org.freedesktop.NetworkManager.settings.modify.global-dns auth
org.freedesktop.NetworkManager.settings.modify.hostname auth
org.freedesktop.NetworkManager.settings.modify.own yes
org.freedesktop.NetworkManager.settings.modify.system yes
org.freedesktop.NetworkManager.sleep-wake no
org.freedesktop.NetworkManager.wifi.scan yes
org.freedesktop.NetworkManager.wifi.share.open yes
org.freedesktop.NetworkManager.wifi.share.protected yes
I think I’m interested enable-disable-network, amn’t?
Have you any ideas?
May be I can solve this problem (mainly activate vpn) by other way?
- Forum
- The Ubuntu Forum Community
- Ubuntu Official Flavours Support
- Networking & Wireless
- [ubuntu] nmcli can’t connect network, user not authorized
-
nmcli can’t connect network, user not authorized
Hi all, I’m trying to create a script in order to download the photos from my action camera, on my notebook I didn’t have any problem, but with my server my user don’t have enough permissions.
nmcli device wifi connect SJ5000 password secret
Error: Failed to add/activate new connection: Not authorized to control networking.The privileges with nmcli for my user.
Code:
nmcli general permissions PERMISSION VALUE org.freedesktop.NetworkManager.enable-disable-network no org.freedesktop.NetworkManager.enable-disable-wifi yes org.freedesktop.NetworkManager.enable-disable-wwan no org.freedesktop.NetworkManager.enable-disable-wimax no org.freedesktop.NetworkManager.sleep-wake no org.freedesktop.NetworkManager.network-control auth org.freedesktop.NetworkManager.wifi.share.protected no org.freedesktop.NetworkManager.wifi.share.open no org.freedesktop.NetworkManager.settings.modify.system no org.freedesktop.NetworkManager.settings.modify.own auth org.freedesktop.NetworkManager.settings.modify.hostname auth org.freedesktop.NetworkManager.settings.modify.global-dns unknown org.freedesktop.NetworkManager.reload auth
I tried to get control creating a pkla file (/etc/polkit-1/localauthority/50-local.d/52-network-control.pkla)
Code:
cat /etc/polkit-1/localauthority/50-local.d/52-network-control.pkla [Enable Controlling of Network Connections] Identity=unix-group:adm Action=org.freedesktop.NetworkManager.network-control ResultActive=yes ResultInactive=no ResultsAny=no
I’m in the adm group.
Can someone help me to solve this problem. I was reading a few days but I didn’t find the answer.
I’m using Ubuntu 16.04.2 LTS (server)
Thanks
Last edited by wildmanne39; March 19th, 2017 at 03:53 AM.
-
Re: nmcli can’t connect network, user not authorized
Please use code tags — if you are using New Reply button — highlight text and use the # button in the text box header.
If using Quick Reply then [code] at the beginning and [/code] at the end.
Please use the default font color and properties unless you need to highlight or draw attention to a part of your post, but they are not intended to be used for an entire post.
Bookmarks
Bookmarks

Posting Permissions
| View previous topic :: View next topic | |||||||||||||
| Author | Message | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Phoen7x n00b ![]() Joined: 29 Dec 2018 |
|
||||||||||||
| Back to top |
|
||||||||||||
| Tony0945 Watchman
Joined: 25 Jul 2006 |
|
||||||||||||
| Back to top |
|
||||||||||||
| Phoen7x n00b ![]() Joined: 29 Dec 2018 |
|
||||||||||||
| Back to top |
|
||||||||||||
| Tony0945 Watchman
Joined: 25 Jul 2006 |
|
||||||||||||
| Back to top |
|
||||||||||||
| Tony0945 Watchman
Joined: 25 Jul 2006 |
|
||||||||||||
| Back to top |
|
||||||||||||
| Tony0945 Watchman
Joined: 25 Jul 2006 |
|
||||||||||||
| Back to top |
|
||||||||||||
| Phoen7x n00b ![]() Joined: 29 Dec 2018 |
|
||||||||||||
| Back to top |
|
||||||||||||
| Phoen7x n00b ![]() Joined: 29 Dec 2018 |
|
||||||||||||
| Back to top |
|
||||||||||||
| Tony0945 Watchman
Joined: 25 Jul 2006 |
|
||||||||||||
| Back to top |
|
||||||||||||
| Hu Moderator
Joined: 06 Mar 2007 |
|
||||||||||||
| Back to top |
|
||||||||||||
| Tony0945 Watchman
Joined: 25 Jul 2006 |
|
||||||||||||
| Back to top |
|
||||||||||||
|
|
You cannot post new topics in this forum |



