Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NetworkManager fails to connect to wifi with user account
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
petr2008
n00b
n00b


Joined: 03 Jan 2008
Posts: 56
Location: Prague, cz

PostPosted: Wed Aug 14, 2019 11:26 am    Post subject: NetworkManager fails to connect to wifi with user account Reply with quote

With user "me" I am getting error instead of dialog asking for wifi device password (as a root it works):

Failed to add/activate connection
(1) Failed to get request UID

tail .xsession-errors
Code:
(nm-applet:8202): nm-applet-WARNING **: 13:07:34.004: Failed to add/activate connection: (1) Failed to get request UID.

(nm-applet:8202): libnm-CRITICAL **: 13:07:34.017: ((/var/tmp/portage/net-misc/networkmanager-1.16.0/work/NetworkManager-1.16.0/libnm-core/nm-setting-connection.c:207)): assertion '<dropped>' failed

In /etc/polkit-1/rules.d/ I have:

10-admin.rules:
Code:
polkit.addAdminRule(function(action, subject) {
    return ["unix-group:wheel"];
});


11-wifi.rules:

Code:
polkit.addRule(function(action, subject) {
    if (action.id == "org.freedesktop.NetworkManager.*" &&
        subject.user == "me") {
        return polkit.Result.YES;
    }

ps -ef | grep kit | grep agent
Code:
me       8213  8067  0 13:06 ?        00:00:00 /usr/libexec/polkit-gnome-authentication-agent-1


What can be wrong?

[Moderator edit: added [code] tags to preserve output layout. -Hu]
Back to top
View user's profile Send private message
petr2008
n00b
n00b


Joined: 03 Jan 2008
Posts: 56
Location: Prague, cz

PostPosted: Wed Aug 14, 2019 8:27 pm    Post subject: Reply with quote

I went through https://wiki.gentoo.org/wiki/NetworkManager#nm-applet_and_X_session_startup
again, modified rules a bit. Rebuild with "networkmanager" use flag. But results are still the same.
As root I can play with windows but I am not able to connect.
Using:

sudo rc-service wpa_supplicant stop
sudo rc-service NetworkManager stop
sudo wpa_supplicant -B -c /etc/wpa_supplicant/pvtc.conf -i wlp2s0
sudo dhclient wlp2s0

I am connected to my wifi.
Spending few hours with networkmanager, should I get a rid of it?
Back to top
View user's profile Send private message
petr2008
n00b
n00b


Joined: 03 Jan 2008
Posts: 56
Location: Prague, cz

PostPosted: Thu Aug 15, 2019 6:39 pm    Post subject: Reply with quote

I found that the error:

Failed to add/activate connection
(1) Failed to get request UID

is caused by the fact that uid of user "me"
is (intentionally) very large.
When tested with user with reasonable uid
this error does not occur.

I tried to make changes into /etc/login.defs:

Code:
# Min/max values for automatic uid selection in useradd(8)
#
UID_MIN          1000
UID_MAX         4000000000 #60000
# System accounts
SYS_UID_MIN        101
SYS_UID_MAX        999
# Extra per user uids
SUB_UID_MIN      4000000000 # 100000
SUB_UID_MAX      6001000000 # 600100000
SUB_UID_COUNT          65536



But it did not help user "me"
Back to top
View user's profile Send private message
petr2008
n00b
n00b


Joined: 03 Jan 2008
Posts: 56
Location: Prague, cz

PostPosted: Tue Aug 20, 2019 5:51 pm    Post subject: Reply with quote

Looking through logs I found possibly related errors:

Code:
vok@pvn ~ $ grep -i "uid" .xsession-errors
dbus-daemon[13701]: Activating service name='org.a11y.atspi.Registry' requested by ':1.0' (uid=3546285467 pid=13749 comm="xfwm4 --display :0.0 --sm-client-id 28cc035d1-0494" label="kernel")
(nm-applet:13782): nm-applet-WARNING **: 19:35:04.438: GDBus.Error:org.freedesktop.NetworkManager.AgentManager.PermissionDenied: Unable to determine request sender and UID.


Code:
pvn /var/log # grep -i "uid" kern.log
...
Aug 20 19:35:01 pvn kernel: [   12.233812] tmpfs: Bad value '-748681829' for mount option 'uid'
..


Code:
pvn /var/log # grep -i "7486" auth.log
...
Aug 15 14:28:03 pvn gnome-keyring-daemon[14502]: couldn't access control socket: /var/run/user/-748681829/keyring/control: No such file or directory
Aug 15 17:16:34 pvn su[20576]: pam_unix(su:auth): authentication failure; logname= uid=-748681829 euid=0 tty=/dev/pts/0 ruser=vok rhost=  user=root
Aug 15 17:32:26 pvn gnome-keyring-daemon[8633]: couldn't access control socket: /var/run/user/-748681829/keyring/control: No such file or directory
Aug 15 17:35:00 pvn gnome-keyring-daemon[8628]: couldn't access control socket: /var/run/user/-748681829/keyring/control: No such file or directory
...


Code:
pvn /var/log # grep -i "7486" kern.log
...
Aug 20 10:38:35 pvn kernel: [    7.968295] tmpfs: Bad value '-748681829' for mount option 'uid'
...


Any hint to get around?
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