ANy GUI application requesting sudo password crashes

Asked by Jaime Cruz

Might be related to:
https://bugs.launchpad.net/ubuntu/+source/gdebi/+bug/1760910

Not just gdebi. ANY GUI application that used to prompt for the sudo password is crashing on my system. I get a pop-up indicating "System program problem detected, do you want to report the problem now?" If I click the "Report Problem" button, the pop-up goes away, but nothing else happens.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Jaime Cruz
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

For diagnostic purposes, what is the output of the commands

uname -a
lsb_release -crid
sudo id
pkexec id

Revision history for this message
Jaime Cruz (jaime-cruz) said :
#2

uname -a:
Linux jaimec-p7-1235 4.18.0-16-generic #17~18.04.1-Ubuntu SMP Tue Feb 12 13:35:51 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -crid:
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic

sudo id:
uid=0(root) gid=0(root) groups=0(root)

pkexec id (Resulted in an error pop-up and then):
Error checking for authorization org.freedesktop.policykit.exec: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

What is the output of the commands

dpkg -l | grep policykit
dpkg -l | grep polkit
ps -ef |grep polkit
sudo systemctl status -l polkitd

Revision history for this message
Jaime Cruz (jaime-cruz) said :
#4

dpkg -l | grep policykit
ii plainbox-secure-policy 0.25-1 all policykit policy required to use plainbox (secure version)
ii policykit-1 0.105-20ubuntu0.18.04.4 amd64 framework for managing administrative policies and privileges
ii policykit-1-gnome 0.105-6ubuntu2 amd64 authentication agent for PolicyKit
ii policykit-desktop-privileges 0.20 all run common desktop actions without password

dpkg -l | grep polkit
ii gir1.2-polkit-1.0 0.105-20ubuntu0.18.04.4 amd64 GObject introspection data for PolicyKit
ii libpolkit-agent-1-0:amd64 0.105-20ubuntu0.18.04.4 amd64 PolicyKit Authentication Agent API
ii libpolkit-backend-1-0:amd64 0.105-20ubuntu0.18.04.4 amd64 PolicyKit backend API
ii libpolkit-gobject-1-0:amd64 0.105-20ubuntu0.18.04.4 amd64 PolicyKit Authorization API
ii lxpolkit 0.5.3-2ubuntu1 amd64 LXDE PolicyKit authentication agent
ii mate-polkit:amd64 1.20.0-1 amd64 MATE authentication agent for PolicyKit-1
ii mate-polkit-common 1.20.0-1 amd64 MATE authentication agent for PolicyKit-1 (common files)

ps -ef |grep polkit
jaimec 2230 2043 0 Mar16 ? 00:00:00 /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
root 16862 1 0 09:39 ? 00:00:00 /usr/lib/policykit-1/polkitd --no-debug
jaimec 26402 26383 0 14:39 pts/0 00:00:00 grep --color=auto polkit

sudo systemctl status -l polkitd
[sudo] password for jaimec:
Unit polkitd.service could not be found.

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

Sorry, my fault, on bionic please use

sudo systemctl status -l polkit

Revision history for this message
Jaime Cruz (jaime-cruz) said :
#6

sudo systemctl status -l polkit
[sudo] password for jaimec:
● polkit.service - Authorization Manager
   Loaded: loaded (/lib/systemd/system/polkit.service; static; vendor preset: en
   Active: active (running) since Sun 2019-03-17 09:39:30 EDT; 12h ago
     Docs: man:polkit(8)
 Main PID: 16862 (polkitd)
    Tasks: 3 (limit: 4915)
   CGroup: /system.slice/polkit.service
           └─16862 /usr/lib/policykit-1/polkitd --no-debug

Mar 17 09:39:30 jaimec-p7-1235 systemd[1]: Starting Authorization Manager...
Mar 17 09:39:30 jaimec-p7-1235 polkitd[16862]: started daemon version 0.105 usin
Mar 17 09:39:30 jaimec-p7-1235 systemd[1]: Started Authorization Manager.
Mar 17 09:39:31 jaimec-p7-1235 polkitd(authority=local)[16862]: Registered Authe
...skipping...
● polkit.service - Authorization Manager
   Loaded: loaded (/lib/systemd/system/polkit.service; static; vendor preset: en
   Active: active (running) since Sun 2019-03-17 09:39:30 EDT; 12h ago
     Docs: man:polkit(8)
 Main PID: 16862 (polkitd)
    Tasks: 3 (limit: 4915)
   CGroup: /system.slice/polkit.service
           └─16862 /usr/lib/policykit-1/polkitd --no-debug

Mar 17 09:39:30 jaimec-p7-1235 systemd[1]: Starting Authorization Manager...
Mar 17 09:39:30 jaimec-p7-1235 polkitd[16862]: started daemon version 0.105 usin
Mar 17 09:39:30 jaimec-p7-1235 systemd[1]: Started Authorization Manager.
Mar 17 09:39:31 jaimec-p7-1235 polkitd(authority=local)[16862]: Registered Authe

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

I do not see anything wrong.
I suggest that you try reinstalling all related packages:

sudo apt install –reinstall plainbox-secure-policy policykit-1 policykit-1-gnome policykit-desktop-privileges gir1.2-polkit-1.0 libpolkit-agent-1-0:amd64 libpolkit-backend-1-0:amd64 libpolkit-gobject-1-0:amd64 lxpolkit mate-polkit:amd64 mate-polkit-common

Revision history for this message
Jaime Cruz (jaime-cruz) said :
#8

Something's not right. I entered that command and got:
E: Unable to locate package –reinstall

I changed it to "--reinstall" and got:
E: Unable to locate package –-reinstall

What am I doing wrong?

Revision history for this message
Manfred Hampl (m-hampl) said :
#9

It seems that here was a wrong autocorrect. That have to be two "normal" minus characters.

sudo apt install --reinstall plainbox-secure-policy policykit-1 policykit-1-gnome policykit-desktop-privileges gir1.2-polkit-1.0 libpolkit-agent-1-0:amd64 libpolkit-backend-1-0:amd64 libpolkit-gobject-1-0:amd64 lxpolkit mate-polkit:amd64 mate-polkit-common

Revision history for this message
Jaime Cruz (jaime-cruz) said :
#10

The command worked, everything was reinstalled correctly. Just to be on the safe side, I rebooted and then tried to start Synaptic Package Manager. Instead of getting prompted for my password, however, I got the same error pop-up I reported at the start, and it never initialized.

Revision history for this message
Manfred Hampl (m-hampl) said :
#11

Sorry to say, but I am at my wits' end.
I do not know what else could be tried.
Maybe somebody else has an idea.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#12
Revision history for this message
Jaime Cruz (jaime-cruz) said :
#13

But the issue isn't me trying to use gksu, it is using GUI applications that internally try to elevate themselves to "su" status. For example, synaptic. I click on the "synaptic" icon, and instead of prompting me for my password, it simply crashes. If I run gdebi and try to install a package, as soon as it tries to get "su" access, it crashes instead of prompting me.

Here's the odd thing... this only happens on my desktop system. It does NOT happen on my laptop. These are the only differences I'm aware of:
The desktop is an AMD/Radeon system, the laptop is pure Intel.
The desktop runs vsftpd and httpd, the laptop does not.
Steam is installed on the desktop, but not the laptop

Other than that, both systems were built with the same installation DVD (Ubuntu Linux 18.04.1) and updated to 18.04.2 with the HWE stack. Where else can I look for clues?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#14

there is no "su status" it doesn't exist

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#15

If you use gksu to run an application with elevated access, is it OK?
If you run:

sudo -i

then run your GUI application, is it OK?

Revision history for this message
Jaime Cruz (jaime-cruz) said :
#16

gksu gedit

Command 'gksu' not found, did you mean:

Running sudo -i, and then my GUI application (in this case, it was the update-manager) seemed to work. Guess one of the updates that was released this morning required root access. Until I tried this method, it just crashed at "waiting for authentication" without any prompts or even the pop-up error I've seen previously.

Revision history for this message
Manfred Hampl (m-hampl) said :
#17

Just an additional idea to check whether it might be a problem with personal settings:
If you create an additional user (granting him admin rights) and log in as that other user - does it work for the other user or crash in the same way?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#18

Read the link I posted. It explains what you should do....

Revision history for this message
Manfred Hampl (m-hampl) said :
#19

@actionparsnip:
You are just proposing a workaround: "if pkexec is crashing, use something else".
What about trying to find out why pkexec is crashing?

Revision history for this message
Jaime Cruz (jaime-cruz) said :
#20

Sorry it took so long to get back to you, Manfred. I finally had a chance to create an "admin" user. Logged in and attempted to start synaptic. Nothing happened. When started from the command line, it started without admin privileges.

On my regular userid, when I attempt to start synaptic I get the pop-up error and it never starts. With the new ID, I never saw the pop-up error, it just crashed immediately.

Revision history for this message
Manfred Hampl (m-hampl) said :
#21

What happens if you try the commands

sudo id
pkexec id

when logged in as the new admin user?

Revision history for this message
Jaime Cruz (jaime-cruz) said :
#22

sudo id
uid=0(root) gid=0(root) groups=0(root)

pkexec id
Error checking for authorization org.freedesktop.policykit.exec: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying

...and then I got the "System program problem detected" pop-up. As always, clicking "Report Problem" does nothing.

Revision history for this message
Jaime Cruz (jaime-cruz) said :
#23

There was a recent update to policykit, but it did not change this behavior at all.

Revision history for this message
Launchpad Janitor (janitor) said :
#24

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Jaime Cruz (jaime-cruz) said :
#25

Would it be possible to copy parameters from a system where policykit works over to this one? Where are these parameters stored? Since creating a new test "Admin" ID didn't resolve the issue I'm guessing they're NOT in the $HOME directory so more likely in /var or /etc?

Revision history for this message
Manfred Hampl (m-hampl) said :
#26

Documentation about D-Bus (which may be the culprit in your case) is available at https://www.freedesktop.org/wiki/Software/dbus/ and https://dbus.freedesktop.org/doc/dbus-daemon.1.html

Revision history for this message
Jaime Cruz (jaime-cruz) said :
#27

Reinstalled the system from scratch and the problem no longer occurs. Never did figure out why it happened in the first place.