WiFi connectivity before login

Questions about WIFI networks and devices
Forum rules
Before you post please read how to get help
Post Reply
dtek
Level 1
Level 1
Posts: 1
Joined: Wed Jun 26, 2019 11:54 am

WiFi connectivity before login

Post by dtek » Wed Jun 26, 2019 12:24 pm

EDIT: This solution does not work! :oops:
It appeared to work after I rebooted the machine, but the next and subsequent times I booted I had to login to get the network running. Still looking for a non-kludgy solution. :x

ORIGINAL POST:
I recently upgraded my headless Mint 13 box to 19.1 and discovered that the network no longer comes up until I log in. That's pretty irritating, and even more irritating is the suggestion that I should simply set it up to auto-login. Searching produced LOTS of posts saying that I simply needed to check the "All users may connect to this network" box in Network Manager. That may have worked on older versions of Ubuntu/Mint (it apparently did on Mint 13), but it no longer works. Another answer I found (here: viewtopic.php?f=47&t=273932) blames systemd, and suggests using nmcli to "change the network permissions." I found it hard to believe that it's a systemd problem and it wasn't clear what permissions needed changing and what they should be changed to.

Finally I discovered that it's a polkit (policykit) configuration "problem," though it looks like Canonical probably intends for it to work the way it does (no network without login) by default. In any case, the solution is to set the policy to allow Network Manager to bring up the network before anyone logs in. I don't know if this introduces a security hole, but at least it doesn't feel like I'm kludging my way to a solution.

Here's what I did:

Copy the vendor supplied policy for Network Manager to the the polkit tree in /etc. If you simply edit the vendor supplied file it may be overwritten by a package upgrade.
# cp /var/lib/polkit-1/localauthority/10-vendor.d/org.freedesktop.NetworkManager.pkla /etc/polkit-1/localauthority/10-vendor.d

Edit the copy from this:
[Adding or changing system-wide NetworkManager connections]
Identity=unix-group:netdev;unix-group:sudo
Action=org.freedesktop.NetworkManager.settings.modify.system
ResultAny=no
ResultInactive=no
ResultActive=yes

to this:
[Adding or changing system-wide NetworkManager connections]
Identity=unix-group:netdev;unix-group:sudo
Action=org.freedesktop.NetworkManager.settings.modify.system
ResultAny=no
ResultInactive=no
ResultActive=no


Reboot and your network should come up without anyone needing to log in.

Post Reply

Return to “Wireless”