12

In 16.04 Ubuntu a guest session can't get wifi access unless a user is logged in.

Is there any way around this nonsense?

Note that in 14.04 it's automatically enabled, in upcoming 17.04 the guest needs to enter wifi password & create a keyring. So may just affect 16.04.

Update: Not a bug, just 1 weird install & user error. The setting to allow all users is not default enabled, once enabled it should work..

doug
  • 16,848
  • 2
  • 45
  • 60
  • and if you save the wifi password for all user in network manager applet ? – solsTiCe Mar 20 '17 at 12:47
  • Well that's the default (all users) so doesn't seem to apply to guests – doug Mar 21 '17 at 02:20
  • My 16.04, with Intel Centrino Advanced-N 6205, using iwlwifi driver has no problem letting the guest session connect, even as first login after a reboot. What hardware/driver are you using? – ubfan1 Mar 23 '17 at 03:18
  • Intel Wireless 7260 driver: iwlwifi, also see same with Intel Centrino Wireless-N 2200 driver: iwlwifi – doug Mar 23 '17 at 03:36
  • Have you enabled 'all users may connect' and 'connect to wifi automatically' under the selected essid in NetworkManager? Asking because I had to disable both to reverse your situation as my device connected to wifi before any login, user or guest. If it doesn't work, try accessing `/etc/NetworkManager/system-connections/(essid)` file manually, just to remove a possible bug out of equation. – user633551 Mar 27 '17 at 20:09
  • @ user633551, yes that's enabled & is the defacto default setting. As far as that file(s), there are some created from guest session as they'd have a line like `permissions=user:guest-wklhrm:;`, but there is no connection in those guest sessions.. – doug Mar 28 '17 at 10:59
  • The default should be `permissions=` which would be equivalent to 'all users may connect'. It seems to be a bug in network manager. You should try deleting `user:guest-wklhrm:;` and reboot to see if the problem persists. – user633551 Mar 28 '17 at 13:45
  • On my system, the default setting is to not let any user connect automatically. I have to manually enable that. Please double-check that the setting is enabled, *and* that `/etc/NetworkManager/system-connections/YourSSID` contains `permissions=` with nothing following the equals sign. For the record, this works for me, 16.04 / BCM43602. – Kaz Wolfe Mar 28 '17 at 19:08
  • @ user633551/Kaz - You all are correct, the setting is not default enabled, checked on a new install. On previous, where it was enabled, I cleared out etc/NetworkManager/system-connections/, deleted the network, re-added & enabled the setting, now guest session automatically gets a wifi connection. (- On the fresh install it got it just by enabling.) If you or Kaz want to put up an answer would accept.. – doug Mar 28 '17 at 22:13
  • @doug lol, apparently I missed a reputation battle... Anyhow, I'm glad I could help and that things are now working as expected :-) – user633551 Mar 29 '17 at 21:01
  • @ user633551, sorry bout that, i'd gladly give you some points also. Will keep my eye out to help boost you up ... – doug Mar 30 '17 at 00:10

1 Answers1

6

As per your comment (and mine)...

By default, connections are not shared publicly with every user on the system. In order to permit this, you need to manually enable this, which can be done either from the GUI or the terminal.

GUI Way

  1. In the Network menu of a privileged account, select the Edit Connections option.
  2. Select the wireless network you would like to share. Go to the General tab.
  3. Select the All users may connect to this network option (see screenshot)

    enter image description here

  4. Click Save.

Terminal way

The network configs are saved in /etc/NetworkManager/system-connections, so we just need to edit the proper file.

  1. cd to /etc/NetworkManager/system-connections and run ls. Identify the network you want to alter (usually just your SSID). In this example, I will be editing the MySSID network.
  2. Run the following command to open a text editor:

    sudo nano MySSID
    
  3. At the top of the file, you will see the [connections] section:

    [connection]
    id=MySSID
    uuid=<redacted>
    type=wifi
    permissions=user:kazwolfe:;
    secondaries=
    timestamp=1490727919
    
  4. Find the permissions= line, and delete everything after the = sign. Your file should look like this:

    [connection]
    id=MySSID
    uuid=<redacted>
    type=wifi
    permissions=
    secondaries=
    timestamp=1490727919
    
  5. Save the file with Ctrl-X.

  6. Restart NetworkManager to ensure your connection settings take effect.

In your specific case (the original question), it seems like it was just a fluke that something didn't get set properly somewhere, or a setting got out of sync. Delete the network profile (from either the terminal or the GUI) and re-connect to your network. Apply the settings as above, and it should work just fine. Alternatively, you can try to dig into the config file to see what's going on, but it's likely easier to just start over.

Also, be sure you don't have multiple conflicting network profiles for a single connection. This can cause some weird issues as some are or aren't given priority over each other, making things confusing to the system.

Kaz Wolfe
  • 33,802
  • 20
  • 111
  • 168