From 8df33ae37696d332ca6dc9eaf89fba4fd8a9f311 Mon Sep 17 00:00:00 2001 From: DJ Lucas Date: Sun, 13 Nov 2016 04:08:20 +0000 Subject: [PATCH] Add polkit configuration for Network Manager. git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@17951 af4574ff-66df-0310-9fd7-8a98e5e911e0 --- general.ent | 4 +-- introduction/welcome/changelog.xml | 9 +++++ networking/netutils/networkmanager.xml | 46 +++++++++++++++++++++----- 3 files changed, 48 insertions(+), 11 deletions(-) diff --git a/general.ent b/general.ent index e9bdf52b54..bee3d4da98 100644 --- a/general.ent +++ b/general.ent @@ -1,12 +1,12 @@ - + - + diff --git a/introduction/welcome/changelog.xml b/introduction/welcome/changelog.xml index 1f3df44239..56afaa986b 100644 --- a/introduction/welcome/changelog.xml +++ b/introduction/welcome/changelog.xml @@ -43,6 +43,15 @@ --> + + November 13th, 2016 + + + [dj] - Add polkit configuration for Network Manager. + + + + November 11th, 2016 diff --git a/networking/netutils/networkmanager.xml b/networking/netutils/networkmanager.xml index 5614940150..fb41944bb4 100644 --- a/networking/netutils/networkmanager.xml +++ b/networking/netutils/networkmanager.xml @@ -33,10 +33,11 @@ NetworkManager is a set of co-operative - tools that make networking simple and straightforward. Whether WiFi, wired, - 3G, or Bluetooth, NetworkManager allows you to quickly move from one network - to another: Once a network has been configured and joined once, it can be - detected and re-joined automatically the next time it's available. + tools that make networking simple and straightforward. Whether WiFi, + wired, 3G, or Bluetooth, NetworkManager allows you to quickly move from + one network to another: Once a network has been configured and joined + once, it can be detected and re-joined automatically the next time it's + available. &lfs7a_checked; @@ -248,11 +249,10 @@ make For NetworkManager to work, at least - minimal configuration file must be present. Such file is not - installed with make install. Issue following - command as the - root user to create - minimal NetworkManager.conf file: + a minimal configuration file must be present. Such file is not + installed with make install. Issue the following + command as the root user to + create minimal NetworkManager.conf file: cat >> /etc/NetworkManager/NetworkManager.conf << "EOF" @@ -267,6 +267,25 @@ EOF for any additional options. + + To allow regular users permission to configure network connections, + you should add them to the + netdev + group, and create a polkit rule that grants + access. Run the following commands as the + root user: + + +/sbin/usermod -a -G netdev <username> + +cat > /usr/share/polkit-1/rules.d/org.freedesktop.NetworkManager.rules << "EOF" +polkit.addRule(function(action, subject) { + if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 && subject.isInGroup("netdev")) { + return polkit.Result.YES; + } +}); +EOF + @@ -286,6 +305,15 @@ EOF as the root user: + + + If using Network Manager to manage + an interface, any previous configuration for that interface should be + removed, and the interface brought down prior to starting + Network Manager. + + + NetworkManager