3

I have a guest account which needs the admin password each time they want to connect to a new wifi endpoint. Ideally, this is not the case as I am not always there to enter it. Additionally, it seems like an everyday task to connect to wifi so I don't understand why this needs an admin's permission.

Is there a way to turn off the admin password requirement for wifi connections?

  • What is a login manager? I googled it, but I get results for a display manager instead. – cheesypeasy Jan 28 '21 at 07:58
  • Yes. So the actual laptop with Ubuntu is being used by someone else at a different location. It is true they only have to set up wifi once, but they have to do it without me having access to that laptop. They do use the GUI. I haven't tried nmcli as, to be honest, I had no idea it existed. But is that even an option now, as there is no internet connection to the laptop at this moment? – cheesypeasy Jan 28 '21 at 08:03
  • The default one was gdm3, so I installed lightdm and then reconfigured dpkg. – cheesypeasy Jan 28 '21 at 08:31
  • Ok, I understand.. Will do it in that way. – PRATAP Jan 28 '21 at 08:32
  • Ok, I confirm the asking for admin password. I think policykit may help in this regard. Will check now. – PRATAP Jan 28 '21 at 09:03
  • Do you have autologin enabled? If so, it could be the keyring wich is not unlocked and keeps asking for a password. Also you could check nm-connection-editor to make sure the all users may connect to this network option is enabled by default. – starkus Jan 28 '21 at 09:04
  • Seems this file has the configuration. /usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy. – PRATAP Jan 28 '21 at 09:26
  • @starkus autologin is not enabled. – cheesypeasy Jan 28 '21 at 09:54
  • 1
    @UnKNOWn thanks! I will have a look at that and let you know if it worked. – cheesypeasy Jan 28 '21 at 09:55
  • 1
    @UnKNOWn Updating the policy has indeed solved the issue. Thank you very much! Would you mind making this an answer to the question? Then I can accept it. – cheesypeasy Jan 28 '21 at 10:08

1 Answers1

1

I have tried it in guest-session in the Question and successfully connected to new wifi connections scanned.

as a super user edit the file /usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy

find the below part

  <action id="org.freedesktop.NetworkManager.settings.modify.system">
    <description>Modify network connections for all users</description>
...
...
...
    <defaults>
      <allow_any>auth_admin_keep</allow_any>
      <allow_inactive>auth_admin_keep</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
  </action>

Edit the line <allow_active>auth_admin_keep</allow_active> to <allow_active>yes</allow_active>

save the file and restart the gnome-shell with "Alt+F2 r Enter" Method.

enter image description here

credits: https://askubuntu.com/a/315900/739431

PRATAP
  • 22,460