Score:1

Ubuntu 22.04 Gnome GUI doesn't ask for password to perform privileged actions (EG Software Updater) - You are not allowed to perform this action

au flag

Screenshot

I've got a fresh install of Ubuntu 22.04 Server. I installed Slim and ubuntu-desktop afterwards to get a GUI.

When I login to the GUI and open the Software Updater it tells me "You are not allowed to perform this action" and doesn't ask me for my password. So I can't use it to install updates. I had a similar issue on Linux Mint some time ago where I installed xdrp and from some guide put in some workarounds to make it work. That stopped PolicyKit from working properly. I'm also using xdrp again, but this time I didn't make the same mistake.

I only found quite some old topics here for old versions but none of them really had a solution from what I can see.

Is there any way to see what the issue really is and to fix it?

Someone asked for some output in another thread which might be helpful as well. Authentication Error: Software can't be installed or removed | You are not allowed to perform this action

ubuntu@digioso:~$ groups
ubuntu adm dialout cdrom floppy sudo audio dip video plugdev netdev lxd admin
ubuntu@digioso:~$ sudo echo success
success
ubuntu@digioso:~$ pkexec echo success
==== AUTHENTICATING FOR org.freedesktop.policykit.exec ===
Authentication is needed to run `/usr/bin/echo' as the super user
Multiple identities can be used for authentication:
 1.  Ubuntu (ubuntu)
 2.  Ubuntu (ubuntu)
Choose identity to authenticate as (1-2): 1
Password:
polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ===
Error executing command as another user: Not authorized

This incident has been reported.
ubuntu@digioso:~$ pkexec echo success
==== AUTHENTICATING FOR org.freedesktop.policykit.exec ===
Authentication is needed to run `/usr/bin/echo' as the super user
Multiple identities can be used for authentication:
 1.  Ubuntu (ubuntu)
 2.  Ubuntu (ubuntu)
Choose identity to authenticate as (1-2): 2
Password:
polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ===
Error executing command as another user: Not authorized

This incident has been reported.
ubuntu@digioso:~$

ubuntu@digioso:~$ systemctl status polkit.service
● polkit.service - Authorization Manager
     Loaded: loaded (/lib/systemd/system/polkit.service; static)
     Active: active (running) since Wed 2023-01-04 20:28:28 CET; 1 day 13h ago
       Docs: man:polkit(8)
   Main PID: 936
      Tasks: 3 (limit: 28694)
     Memory: 5.3M
        CPU: 911ms
     CGroup: /system.slice/polkit.service
             └─936 /usr/libexec/polkitd --no-debug

Jan 05 21:08:26 digioso.subnet12221621.vcn12221621.oraclevcn.com polkitd(authority=local)[936]: Unregistered Authentication Agent for unix-process:306901:8860360 (system bus name>
Jan 05 21:08:35 digioso.subnet12221621.vcn12221621.oraclevcn.com polkitd(authority=local)[936]: Registered Authentication Agent for unix-process:306901:8860360 (system bus name :>
Jan 05 21:08:44 digioso.subnet12221621.vcn12221621.oraclevcn.com polkitd(authority=local)[936]: Operator of unix-process:306901:8860360 FAILED to authenticate to gain authorizati>
Jan 05 21:08:44 digioso.subnet12221621.vcn12221621.oraclevcn.com polkitd(authority=local)[936]: Unregistered Authentication Agent for unix-process:306901:8860360 (system bus name>
Jan 05 21:10:48 digioso.subnet12221621.vcn12221621.oraclevcn.com polkitd(authority=local)[936]: Registered Authentication Agent for unix-process:306901:8860360 (system bus name :>
Jan 05 21:10:53 digioso.subnet12221621.vcn12221621.oraclevcn.com polkitd(authority=local)[936]: Operator of unix-process:306901:8860360 FAILED to authenticate to gain authorizati>
Jan 05 21:10:53 digioso.subnet12221621.vcn12221621.oraclevcn.com polkitd(authority=local)[936]: Unregistered Authentication Agent for unix-process:306901:8860360 (system bus name>
Jan 05 21:10:54 digioso.subnet12221621.vcn12221621.oraclevcn.com polkitd(authority=local)[936]: Registered Authentication Agent for unix-process:306901:8860360 (system bus name :>
Jan 05 21:10:59 digioso.subnet12221621.vcn12221621.oraclevcn.com polkitd(authority=local)[936]: Operator of unix-process:306901:8860360 FAILED to authenticate to gain authorizati>
Jan 05 21:10:59 digioso.subnet12221621.vcn12221621.oraclevcn.com polkitd(authority=local)[936]: Unregistered Authentication Agent for unix-process:306901:8860360 (system bus name>
ubuntu@digioso:~$ 

Thanks @lucius, but I feat that I have a different problem.

root@digioso:/etc/polkit-1/localauthority.conf.d# ls -lart
total 16
-rw-r--r-- 1 root root   65 Feb 26  2022 51-ubuntu-admin.conf
-rw-r--r-- 1 root root  267 Feb 26  2022 50-localauthority.conf
drwxr-xr-x 4 root root 4096 Nov  6 03:31 ..
drwxr-xr-x 2 root root 4096 Nov  6 03:32 .
root@digioso:/etc/polkit-1/localauthority.conf.d# cat ^C
root@digioso:/etc/polkit-1/localauthority.conf.d# cat 51-ubuntu-admin.conf
[Configuration]
AdminIdentities=unix-group:sudo;unix-group:admin
root@digioso:/etc/polkit-1/localauthority.conf.d# cat 50-localauthority.conf
# Configuration file for the PolicyKit Local Authority.
#
# DO NOT EDIT THIS FILE, it will be overwritten on update.
#
# See the pklocalauthority(8) man page for more information
# about configuring the Local Authority.
#

[Configuration]
AdminIdentities=unix-user:0
root@digioso:/etc/polkit-1/localauthority.conf.d#
hr flag
What is the status of the polkit service? (ex. `systemctl status polkit.service`)
Digioso avatar
au flag
Edited initial post with status of polkit service.
Score:0
au flag

I had this issue and figured out what was the cause. But bear in mind, that it might be a very specific case. I turned-off these authentication popups explicitly for my son's account, because there was an annoying issue with STEAM: it was requesting an admin-user password to modify global Network settings, which is absolutely unacceptable.

I've created a file 90-silence-steam.conf in the /etc/polkit-1/localauthority.conf.d/ directory, with the following content:

[Stop steam user from prompting for network permissions]
Identity unix-user:username
Action org.freedesktop.NetworkManager.settings.modify.system
ResultActive no
ResultInactive no
ResultAny no

If you did something similar in some config in the directory /etc/polkit-1/localauthority.conf.d/, then it might be the reason. So you can undo whatever you did and find another way around. For the time being I just disabled every line there with #.

I hope it will help at least to those who're facing this issue by the same reason as I did.

Digioso avatar
au flag
Thanks a lot, but I fear that I have another problem.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.