Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unable to add new Wifi networks after migration to systemd
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
adimanav
n00b
n00b


Joined: 14 Jan 2011
Posts: 13

PostPosted: Sun Nov 03, 2013 4:30 am    Post subject: Unable to add new Wifi networks after migration to systemd Reply with quote

I'm using KDE and I recently switched to systemd. Everything's working except I lost the existing Wifi connections set up using networkmanagement. And when I try to connect to a network I get the error popup "Error adding connection: Insufficient privileges". After doing some research on the internet I see that the output of the command
Code:
loginctl session-status 1
does not show NetworkManager. Maybe this is the reason and I don't know how to fix it. Can anyone help out? Thanks in advance.
Back to top
View user's profile Send private message
croutch
n00b
n00b


Joined: 04 Aug 2012
Posts: 31
Location: göteborg

PostPosted: Sun Nov 03, 2013 5:37 am    Post subject: Reply with quote

Hello.

Have you started networkmanager?

systemctl enable NetworkManager
systemctl start NetworkManager

Sheck if your usersession is active with.
loginctl show-session $XDG_SESSION_ID
Back to top
View user's profile Send private message
adimanav
n00b
n00b


Joined: 14 Jan 2011
Posts: 13

PostPosted: Sun Nov 03, 2013 5:54 am    Post subject: Reply with quote

Yes I enabled and started NetworkManager. Networkmanagement widget even shows the available WiFi networks. Just errors out on trying to connect to one. Loginctl show-session tells me that the session is active.
Back to top
View user's profile Send private message
TomWij
Developer
Developer


Joined: 04 Jul 2012
Posts: 1551

PostPosted: Sun Nov 03, 2013 6:01 am    Post subject: Reply with quote

Is your user in the wheel group? Does `journalctl -rb` after trying to connect to a network yield more details?
Back to top
View user's profile Send private message
adimanav
n00b
n00b


Joined: 14 Jan 2011
Posts: 13

PostPosted: Sun Nov 03, 2013 6:32 am    Post subject: Reply with quote

Yes my user is in the wheel group. Journalctl does not show any info.
Back to top
View user's profile Send private message
adimanav
n00b
n00b


Joined: 14 Jan 2011
Posts: 13

PostPosted: Sun Nov 03, 2013 6:57 am    Post subject: Reply with quote

I reemerged kde-misc/networkmanagement with debug useflag but no useful info from there. The error is being thrown from the NetworkManager backend.
Back to top
View user's profile Send private message
croutch
n00b
n00b


Joined: 04 Aug 2012
Posts: 31
Location: göteborg

PostPosted: Sun Nov 03, 2013 8:53 am    Post subject: Reply with quote

When googling this line- Error adding connection: Insufficient privileges systemd.

Everything points to policykit/consolekit/pam.

https://www.google.se/?gws_rd=cr&ei=qAp2UoPzAcKe4gSEu4CACQ#q=Error+adding+connection%3A+Insufficient+privileges+systemd
Back to top
View user's profile Send private message
TomWij
Developer
Developer


Joined: 04 Jul 2012
Posts: 1551

PostPosted: Sun Nov 03, 2013 11:27 am    Post subject: Reply with quote

Ah, made a wrong guess, though I remember the wheel group being important for other parts; you'll want the plugdev group as well.

See /usr/share/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules as to why that is.
Back to top
View user's profile Send private message
adimanav
n00b
n00b


Joined: 14 Jan 2011
Posts: 13

PostPosted: Sun Nov 03, 2013 11:57 am    Post subject: Reply with quote

The user is in the plugdev group as well. Things were working fine when I had consolekit. All I did was disable consolekit and add the systemd useflag and update. Then I enabled the various services. Except for WiFi everything else is working. I tried a LAN cable and that works too. So here am I typing from my tablet. I'm emerging gnome to see if that changes anything though I doubt it. I hope I don't have to revert back from systemd.
Back to top
View user's profile Send private message
croutch
n00b
n00b


Joined: 04 Aug 2012
Posts: 31
Location: göteborg

PostPosted: Sun Nov 03, 2013 12:30 pm    Post subject: Reply with quote

Can this help you?
https://wiki.archlinux.org/index.php/NetworkManager#Set_up_PolicyKit_permissions
Back to top
View user's profile Send private message
adimanav
n00b
n00b


Joined: 14 Jan 2011
Posts: 13

PostPosted: Sun Nov 03, 2013 2:31 pm    Post subject: Reply with quote

Thanks for the info. The user is already in wheel (as recommended by the article) and plugdev group so that should not be the issue. Thing is since NetworkManager was working fine without systemd, should there be any need to mess around with Polkit settings?

For the time being I'm using the wpa_supplicant@ service and manually entered info in the conf file. Of course would be awesome to get NetworkManager working with systemd.

As an aside I see that I'm not able to shutdown or restart the machine from the Gnome menu. Another systemd related issue?
Back to top
View user's profile Send private message
TomWij
Developer
Developer


Joined: 04 Jul 2012
Posts: 1551

PostPosted: Sun Nov 03, 2013 2:46 pm    Post subject: Reply with quote

Did you follow the systemd and GNOME 3.8 upgrade guide?

http://wiki.gentoo.org/wiki/systemd
http://wiki.gentoo.org/wiki/GNOME/3.8-upgrade-guide

From what I remember you need to switch from consolekit to polkit and make sure you enable the systemd USE flag globally.
Back to top
View user's profile Send private message
croutch
n00b
n00b


Joined: 04 Aug 2012
Posts: 31
Location: göteborg

PostPosted: Sun Nov 03, 2013 5:22 pm    Post subject: Reply with quote

Start here first
https://wiki.archlinux.org/index.php/WPA_supplicant
http://wiki.gentoo.org/wiki/Wpa_supplicant

https://wiki.archlinux.org/index.php/Wireless
http://wiki.gentoo.org/wiki/Wifi

Take a look at last post date is from 2013-09-25.
https://bbs.archlinux.org/viewtopic.php?id=170353
dhcpcd@.service starts wpa_supplicant when adressed to a wireless adapter by itself so wpa_supplicant@.service is no longer needed.

That sounds to me if you disable all wifi that you find with systemctl,and have networkmanager enabled. Networkmanager should pick it up autmatically on reboot??
Back to top
View user's profile Send private message
adimanav
n00b
n00b


Joined: 14 Jan 2011
Posts: 13

PostPosted: Mon Nov 04, 2013 5:52 am    Post subject: Reply with quote

@TomWij, Yes I followed the systemd and Gnome 3.8 upgrade guide. I already had the policykit useflag enabled. Just removed the consolekit useflag and enabled systemd useflag globally.

@croutch, wifi is working with dhcpcd and wpa_supplicant. On using NetworkManager it picks up the available wifi connections but does not let me connect/add any.

With Gnome 3.8 I'm seeing the following error in the logs when I try to connect to a wifi network using nm-applet, "gnome-session[3826]: Window manager warning: Log level 16: Device activation failed: (32) Not authorized to control networking."
Back to top
View user's profile Send private message
adimanav
n00b
n00b


Joined: 14 Jan 2011
Posts: 13

PostPosted: Mon Nov 04, 2013 10:52 am    Post subject: Reply with quote

I think I found the reason. I'm running hardened Gentoo with CONFIG_GRKERNSEC_PROC set in the kernel. It apparently interferes with systemd. Someone had opened a bug for that https://bugs.freedesktop.org/show_bug.cgi?id=65575

Let me see if things work fine after unselecting that kernel option...
Back to top
View user's profile Send private message
adimanav
n00b
n00b


Joined: 14 Jan 2011
Posts: 13

PostPosted: Mon Nov 04, 2013 11:00 am    Post subject: Reply with quote

Yup, that solved it!

Thanks folks for your help!
Back to top
View user's profile Send private message
TomWij
Developer
Developer


Joined: 04 Jul 2012
Posts: 1551

PostPosted: Mon Nov 04, 2013 11:33 am    Post subject: Reply with quote

adimanav wrote:
I think I found the reason. I'm running hardened Gentoo with CONFIG_GRKERNSEC_PROC set in the kernel. It apparently interferes with systemd. Someone had opened a bug for that https://bugs.freedesktop.org/show_bug.cgi?id=65575

Let me see if things work fine after unselecting that kernel option...


Filed a bug about this at https://bugs.gentoo.org/show_bug.cgi?id=490366 and thank you for discovering this.
Back to top
View user's profile Send private message
TomWij
Developer
Developer


Joined: 04 Jul 2012
Posts: 1551

PostPosted: Mon Nov 04, 2013 12:50 pm    Post subject: Reply with quote

Change has been committed by mgorny; the sys-apps/systemd package now checks for it to be disabled, thanks again.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum