11

I recently upgraded ubuntu from 19.04 to 19.10. Initially, I was not able to login into this user. Whenever I entered password it didn't log in and asked for password again. There was a kind of login loop. Now I am able to login after changing the display manager to lightgdm. But I don't know what is wrong now. After login, it keeps on asking the authentication for every possible thing. Some of them are "Authentication required to create a color profile", "Authentication required to refresh the system repositories", "System policy prevents Wifi scan" and many more. This user is already in the sudo group. Other user works fine. And I am not even able to "unlock the user in Users Settings (this solution is given at many places). Please help me.

Ankit Jain
  • 111
  • 1
  • 1
  • 3
  • I'm also having this problem on my 18.04, except I didn't have login loop issue at all. It just happened, and polkit actions seems doesn't work. Still don't have any resoultion for this. – adadion Jun 22 '20 at 05:03
  • Unfortunately, the only thing that fixed it was upgrading to 20.04. – markroxor Jun 22 '20 at 07:42
  • I've upgraded to 21.04 and still having the same issues. Would be great to have a solution that doesn't require messing with .pkla files – WhooNo Aug 26 '21 at 12:42

3 Answers3

10

I have 18.04 with the exact same problem for days, and now has been solved. All I did was creating .pkla file containing custom policy for sudo group in /etc/polkit-1/localauthority/50-local.d/99-sudonopassword.pkla. (I must login with root in terminal -> sudo su.

[No password prompt]
Identity=unix-group:sudo
Action=*
ResultActive=yes
ResultInactive=yes
ResultAny=yes

See pklocalauthority for more details. Then reboot just in case.

If it fails, try reinstall polkit using sudo apt install --reinstall policykit-1. Then reboot just in case.

adadion
  • 746
  • 1
  • 10
  • 24
4

Once you are logged in mainly the system ask for color profile and management password as well as Repository update and shut down. The following content should be written in a file named say "nofurtherlogin.pkla" in /etc/polkit-1/localauthority/50-local.d/ by the command

sudo nano /etc/polkit-1/localauthority/50-local.d/nofurtherlogin.pkla

now paste the following contents in the file:

[Allow colord for all users]
Identity=unix-user:*
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
ResultAny=yes
ResultInactive=yes
ResultActive=yes


[Allow Package Management all Users]
Identity=unix-user:*
Action=org.freedesktop.packagekit.system-sources-refresh
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Allow all users to shutdown]
Identity=unix-user:*
Action=org.freedesktop.login1.power-off-multiple-sessions
ResultAny=yes
ResultActive=yes

[Allow all users to reboot]
Identity=unix-user:*
Action=org.freedesktop.login1.reboot-multiple-sessions
ResultAny=yes
ResultActive=yes

[Allow all users to suspend]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend-multiple-sessions
ResultAny=yes
ResultActive=yes

[Allow all users to ignore inhibit of shutdown]
Identity=unix-user:*
Action=org.freedesktop.login1.power-off-ignore-inhibit
ResultAny=yes
ResultActive=yes

[Allow all users to ignore inhibit of reboot]
Identity=unix-user:*
Action=org.freedesktop.login1.reboot-ignore-inhibit
ResultAny=yes
ResultActive=yes

[Allow all users to ignore inhibit of suspend]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend-ignore-inhibit
ResultAny=yes
ResultActive=yes

This will solve the problem for 20.04 also

knjhaveri
  • 121
  • 4
0

I'm having this exact same issue and can't for the life of me figure it out. It started when I had the user login loop where it wouldn't accept my password and remain stuck on the login page. I solved that issue using this link (solved answer), where I simply changed the GRUB_CMDLINE_LINUX_DEFAULT in the /etc/default/grub file to nomodset, updating grub, then installing lightdm. Ever since then I'm being asked to authenticate for every little thing I do.

user7392939
  • 23
  • 1
  • 8