[solved] Network-manager polkit permissions

I have built a minimal mate desktop for rpi2/3

The issue I am having is that network-manager supply sufficient permissions to connect to access points.

Basically the polkit is messed up.

I’ve added myself to netdev group and I checked the /var/lib/polkit directory and found the network manager conf and confirmed it is using the netdev group.

Still I am not able to to a wifi connect via network manager (without typing sudo password). I am setting up a headless wap connect to I need to get netdev group to have permission to connect to wifi wap.

Any ideas what else to try or confirm

Is that a GKSU-type password (in a GUI box) or a proper sudo password in a terminal? I only ask because if the latter, I have a bodge-type workaround for the issue without working out what is causing it in the first place.

What distribution is your minimal mate desktop based on?

@stevecook172001 I built a headless rpi and then added minimal mate to it without enabling the desktop in systemd. That allowed me to mostly just ssh to the box but still run a remote desktop (via nomachine).

details here [solved] Issue converting to headless multi-user boot

So my understanding is that polkit agent is typically run as part of the desktop x session which is probably why I am having an issue.

So from ssh command line I did see that there is a polkitd.service running. Still no love. nmcli has a polkit agent but I can’t grok how to start it (when I do it doesn’t come back to a prompt) which I thought it should so I could run my connect command with this polkit agent running but no love there either.

So yes it’s not a desktop x session that I’ve opend a terminal in it is either a terminal at boot via a monitor or an ssh session. Either way when I give
nmcl d wifi connect nameofwap I get the no permission error.

Ulimately (and what I have done for now) is run my node program as sudo (which calls nmcli). So it works but just want to understand why polkit isn’t working as it should. Like I said the settings, groups, polkit files all look good so I am betting I am not really running a polkit agent being as I am not running from withing a desktop gui.

So yea let me have what you know…thx

I figured out a work around

In /etc/NetworkManager/NetworkManager.conf put auth-polkit=false in the main section.

Doesn’t explain why polkit isn’t working with network manager but this makes sudo go away. Not a good thing to do on a shared machine but this is fine in this case

[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq
auth-polkit=false

@dkebler If your satisfied with your solution, please mark it as solved so that it may benefit others someday.