Ubuntu – “Authentication required to refresh system repositories” in Ubuntu 19.10

19.10authentication

If one of the users in our group tries to login to his desktop computer, he gets a popup "Authentication required to refresh system repositories". When I type in my administrator password in this popup, the popup does not disappear. It seems that only a hard reboot solves the problem temporarily, because after a few days the same popup appears again. When I login as a user with sudo privileges, though, everything works fine. The operating system is Ubuntu 19.10.

The user has no scripts running on startup, other than loading his bashrc and setting his environment variables.

I already searched the internet, but I have been unable to find a solution (I have done the most recent upgrades). I would really appreciate your help.

Best Answer

This happens when using xRDP (remote sessions or Hyper-V enhanced sessions) into Ubuntu. The remote sessions are more restrictive than local sessions for the same user, and this fixes it.

For Ubuntu 19.10, do this in a terminal

sudo bash
cd /etc/polkit-1/localauthority/50-local.d
nano 46-allow-update-repo.pkla

and then put this inside the file

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