pkexec does not find any authentication agent

Bug #976638 reported by Markus Naeher on 2012-04-08
120
This bug affects 34 people
Affects Status Importance Assigned to Milestone
PolicyKit
Unknown
High
policykit-1 (Ubuntu)
High
Unassigned

Bug Description

I am using xubuntu, but I am pretty sure that other variants are affected too.

My problem started with being unable to start synaptic from the menu.
So far, I have found out that synaptic is started with pkexec.

When I test starting
pkexec /usr/sbin/synaptic
in a terminal, it asks for the password in text mode.

With another test
pkexec --disable-internal-agent /usr/sbin/synaptic
in the terminal, it says it has not found any authentication agent.

I have two AMD64 PC's and a i386 laptop. The problem occurs on one of the PC's and the laptop.
Comparing the /etc directory trees of the PC's showed many differences, but I could not find anything suspicious about the polycikit configuration.

For the moment, using gksu instead of pkexec is a workaround.

Thanks and Regards,
Markus

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: policykit-1 0.104-1
ProcVersionSignature: Ubuntu 3.2.0-22.35-generic 3.2.14
Uname: Linux 3.2.0-22-generic x86_64
ApportVersion: 2.0-0ubuntu4
Architecture: amd64
Date: Sun Apr 8 17:05:34 2012
InstallationMedia: Xubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120330)
ProcEnviron:
 LANGUAGE=de_DE:en
 TERM=xterm
 PATH=(custom, no user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: policykit-1
UpgradeStatus: No upgrade log present (probably fresh install)

Markus Naeher (kubuntu-user) wrote :
summary: - pkexec does not find any authenticaton agent
+ pkexec does not find any authentication agent
Markus Naeher (kubuntu-user) wrote :

I have just re-installed the policykit packages, no change.
And I have verified that polkitd is running.

Markus Naeher (kubuntu-user) wrote :

When I try to start
DISPLAY=:0.0 /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
from a shell, I get this error:
(polkit-gnome-authentication-agent-1:18885): GLib-CRITICAL **: g_variant_new_string: assertion `string != NULL' failed

(polkit-gnome-authentication-agent-1:18885): polkit-gnome-1-WARNING **: Failed to register client: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files

Andreas Schirra (preludi) wrote :

I have exactly the same problem on XUbuntu 12.04:

- OS: XUbuntu 12.04, all updates are installed
- boot from USB drive (real installation, no live system); memory is o.k.: 8 GB flash drive; 3,5 GB free space
- computer: IBM T43, standard equipped, no special features; runs fine on Ubuntu 10.04 since years
- usage of Xubuntu 12.04 was o.k. for a few days; problem with synaptic password window occurred "out of the blue"
- I come around this problem by starting synaptic in the terminal

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in policykit-1 (Ubuntu):
status: New → Confirmed
Guy (guy-b) wrote :

Maybe I'm posting in the wrong place, if so, thank you for telling it and guide me to the wright one. I have also a problem with synaptic and polkit when I launch it from the menu with synaptic-pkexec it gives me this error (seens Xubuntu 11.10):

(polkit-gnome-authentication-agent-1:8248): polkit-gnome-1-WARNING **: Unable to get a pixbuf for GTK_STOCK_DIALOG_AUTHENTICATION (gtk-dialog-authentication) at size 48

I'm on Xubuntu 12.04 LTS 64 bit and by every session (autologin + autostartx with mingetty and no DM) I got this error from polkit-agent:

(polkit-gnome-authentication-agent-1:8248): GLib-CRITICAL **: g_variant_new_string: assertion `string != NULL' failed

(polkit-gnome-authentication-agent-1:8248): polkit-gnome-1-WARNING **: Failed to register client: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files

The workaround is to start synaptic in a terminal with gksudo synaptic and no error occur.

Markus Naeher (kubuntu-user) wrote :

Looks like it's the same problem. Maybe you could add a bit bug heat if you add yourself to the list of affected persons (the green link right below the heading "This bug affects ...").

Guy (guy-b) wrote :

Done, thank you.

Sidney Harrell (sidney-harrell) wrote :

I'm getting the synaptic problem, no restart or shutdown buttons (greyed out) and no sound. Can anyone else check their ck-list-sessions output.
[code]

sidney@sidney:~$ ck-list-sessions
Session1:
 unix-user = '1000'
 realname = 'sidney'
 seat = 'Seat2'
 session-type = ''
 active = FALSE
 x11-display = ':0'
 x11-display-device = '/dev/tty7'
 display-device = ''
 remote-host-name = ''
 is-local = FALSE
[/code]
active=false and is-local=false. I'm pretty sure it has something to do with consolekit

Got the is-local to turn to TRUE by changing the last line in /etc/pam.d/common-session to turn off nox11 mode. But still having the same 3 problems.

Guy (guy-b) wrote :

Here is mine:

ck-list-sessions
Session1:
 unix-user = '1000'
 realname = 'xxxxxxxxxx'
 seat = 'Seat1'
 session-type = ''
 active = FALSE
 x11-display = ''
 x11-display-device = ''
 display-device = '/dev/tty1'
 remote-host-name = ''
 is-local = TRUE
 on-since = '2012-05-28T04:49:07.132882Z'
 login-session-id = '4294967295'
 idle-since-hint = '2012-05-28T04:49:37.789423Z'
Session2:
 unix-user = '1000'
 realname = 'xxxxxxxxxx'
 seat = 'Seat1'
 session-type = ''
 active = TRUE
 x11-display = ':0'
 x11-display-device = '/dev/tty3'
 display-device = '/dev/tty1'
 remote-host-name = ''
 is-local = TRUE
 on-since = '2012-05-28T04:49:08.179929Z'
 login-session-id = '4294967295'

I don't know why, but by you something is realy wrong.

removed xdm, all 3 problems solved and I'm getting the same ck-list-sessions output as @Guy

Guy (guy-b) wrote :

Nice! You are starting X without any dm now? Do you still have the polkit-agent errors?

Download full text (4.8 KiB)

I went through and removed all the gnome stuff that I could get away with:

Start-Date: 2012-05-28 03:27:46
Commandline: synaptic
Install: compiz-kde:amd64 (0.9.7.8-0ubuntu1, automatic), compizconfig-backend-kconfig:amd64 (0.9.2-0ubuntu1, automatic)
Remove: python-keyring:amd64 (0.7.1-1fakesync1), unity:amd64 (5.12-0ubuntu1), metacity:amd64 (2.34.1-1ubuntu11), ubuntu-docs:amd64 (12.04.5), gir1.2-ubuntuoneui-3.0:amd64 (3.0.0-0ubuntu1), tumbler:amd64 (0.1.24-0ubuntu1), system-config-printer-gnome:amd64 (1.3.8+20120201-0ubuntu8), libtumbler-1-0:amd64 (0.1.24-0ubuntu1), ubuntuone-client:amd64 (3.0.0-0ubuntu1), zenity:amd64 (3.4.0-0ubuntu4), libgnome-control-center1:amd64 (3.4.1-0ubuntu2), libgtk2-perl:amd64 (1.223-1build3), gnome-settings-daemon:amd64 (3.4.1-0ubuntu1.1), unity-scope-musicstores:amd64 (5.12.0-0ubuntu1), gnome-session-common:amd64 (3.2.1-0ubuntu8), python-launchpadlib:amd64 (1.9.12-1), indicator-applet:amd64 (0.5.0-0ubuntu1), python-gnomekeyring:amd64 (2.32.0+dfsg-1), usb-creator-gtk:amd64 (0.2.38), indicator-applet-complete:amd64 (0.5.0-0ubuntu1), gnome-control-center-data:amd64 (3.4.1-0ubuntu2), gnome-keyring:amd64 (3.2.2-2ubuntu4), libpango-perl:amd64 (1.222-1build1), rhythmbox-ubuntuone:amd64 (3.0.0-0ubuntu1), sessioninstaller:amd64 (0.20+bzr128-0ubuntu1), ubuntu-sso-client-gtk:amd64 (3.0.0-0ubuntu2), tumbler-common:amd64 (0.1.24-0ubuntu1), indicator-power:amd64 (2.0-0ubuntu1), libsyncdaemon-1.0-1:amd64 (3.0.0-0ubuntu1), compiz-gnome:amd64 (0.9.7.8-0ubuntu1), desktop-base:amd64 (6.0.7ubuntu1), python-gi-cairo:amd64 (3.2.2-1~precise), libglib-perl:amd64 (1.241-1), python-ubuntu-sso-client:amd64 (3.0.0-0ubuntu2), network-manager-pptp-gnome:amd64 (0.9.4.0-0ubuntu1), ubuntu-sso-client:amd64 (3.0.0-0ubuntu2), libubuntuoneui-3.0-1:amd64 (3.0.0-0ubuntu1), yelp:amd64 (3.4.1-0ubuntu1), indicator-session:amd64 (0.3.96-0ubuntu1), zenity-common:amd64 (3.4.0-0ubuntu4), indicator-datetime:amd64 (0.3.94-0ubuntu2), gnome-control-center:amd64 (3.4.1-0ubuntu2), python-apport:amd64 (2.0.1-0ubuntu7), gnome-user-guide:amd64 (3.4.1-1), gnome-online-accounts:amd64 (3.4.0-0ubuntu1), compiz:amd64 (0.9.7.8-0ubuntu1), libpam-gnome-keyring:amd64 (3.2.2-2ubuntu4), python-gconf:amd64 (2.28.1+dfsg-1)
End-Date: 2012-05-28 03:31:55

Start-Date: 2012-05-28 03:41:54
Commandline: synaptic
Remove: libyelp0:amd64 (3.4.1-0ubuntu1), libnm-gtk0:amd64 (0.9.4.1-0ubuntu2), libgoa-1.0-0:amd64 (3.4.0-0ubuntu1), evolution-data-server:amd64 (3.2.3-0ubuntu7), libgoa-1.0-common:amd64 (3.4.0-0ubuntu1)
End-Date: 2012-05-28 03:41:59

Start-Date: 2012-05-28 03:49:02
Commandline: synaptic
Install: polkit-kde-1:amd64 (0.99.0-3ubuntu5, automatic)
Remove: policykit-1-gnome:amd64 (0.105-1ubuntu3), jockey-gtk:amd64 (0.9.7-0ubuntu7)
End-Date: 2012-05-28 03:49:13

With xdm installed, my /var/log/ConsoleKit/history entry looks like:

1338187484.617 type=SEAT_SESSION_REMOVED : seat-id='Seat1' session-id='Session1' session-type='' session-x11-display='' session-x11-display-device='' session-display-device='/dev/tty1' session-remote-host-name='' session-is-local=TRUE session-unix-user=1000 session-creation-time='2012-05-28T06:34:47.893356Z'
1338187484.628 type=SEAT_ACTIVE_SESSION_CHANGE...

Read more...

Markus Naeher (kubuntu-user) wrote :

It has turned out that the problem affects more components than I originally noticed:

When I try to configure system time / date in XFCE (also needed for selecting the appropriate NTP server), the dialog starts up locked and there is an "unlock" button. This button is also non-functional, probably due to the policykit problem.

Although I have seen some people finding workarounds, I think they aren't practicable. In the german ubuntu-users forum I have already got some feedback that the problem affects more and more users in between. And for every one, it comes out of the blue.
As this affects the system configuration and setup utilities, I consider it to be more important than the bug heat may indicate, but the bug status gives me the impression no one is actually working on it. I would like to kindly ask if there are any plans for this bug ...

Guy (guy-b) wrote :

After the last update to policykit-1-gnome 0105-1ubuntu3.1, nothing better. Concerning bugs around policykit-1-gnome, I hoppened a bug report, if more users are affected by the xsession-errors mentionned in #6, please let it know here too:

https://bugs.launchpad.net/ubuntu/+source/policykit-1-gnome/+bug/1000679

Markus Naeher (kubuntu-user) wrote :

I have found the solution by happenstance:

(I am using XFCE in German, so maybe the wording I describe here is not 100% accurate)
In the XFCE settings menu -> Session management -> Automatically started applications, there is an Item "Policykit Authentication Agent".
This was unchecked. Re-check, reboot (probably logout and login is sufficient), and it is back working.

But: I am absolutely sure I did not remove the check. On one of the affected computers, I have never been in this dialog before.

Tom Oehser (tom-toms) wrote :

That didn't help me...

Martin Spacek (mspacek) wrote :

I'm seeing the same thing in Xubuntu 14.04: pkexec works in text mode, but not GUI mode. If I run it with the --disable-internal-agent flag, it raises "Error executing command as another user: No authentication agent found." polkitd is running, as is polkit-gnome-authentication-agent-1.

This is a fresh install. This wasn't a problem in Xubuntu 12.10. I have installed some gnome-related packages in order to compile various programs. "Policykit Authentication Agent" in Session & Startup in the settings is enabled.

Martin Spacek (mspacek) wrote :

I have an unsubstantiated hunch that Bug #1314782 (multimedia keys don't work when xfce4-volumed is run in daemon mode) is related. Something to do with a dbus race condition.

It renders essential functionality of the package (or a dependent one) broken.

Changed in policykit-1 (Ubuntu):
importance: Undecided → Critical
importance: Critical → High

I am using xubuntu, but I am pretty sure that other variants are affected too.

My problem started with being unable to start synaptic from the menu.
So far, I have found out that synaptic is started with pkexec.

When I test starting
pkexec /usr/sbin/synaptic
in a terminal, it asks for the password in text mode.

With another test
pkexec --disable-internal-agent /usr/sbin/synaptic
in the terminal, it says it has not found any authentication agent.

I have two AMD64 PC's and a i386 laptop. The problem occurs on one of the PC's and the laptop.
Comparing the /etc directory trees of the PC's showed many differences, but I could not find anything suspicious about the polycikit configuration.

For the moment, using gksu instead of pkexec is a workaround.

Thanks and Regards,
Markus

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: policykit-1 0.104-1
ProcVersionSignature: Ubuntu 3.2.0-22.35-generic 3.2.14
Uname: Linux 3.2.0-22-generic x86_64
ApportVersion: 2.0-0ubuntu4
Architecture: amd64
Date: Sun Apr 8 17:05:34 2012
InstallationMedia: Xubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120330)
ProcEnviron:
 LANGUAGE=de_DE:en
 TERM=xterm
 PATH=(custom, no user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: policykit-1
UpgradeStatus: No upgrade log present (probably fresh install)

Changed in policykit-1 (Ubuntu):
status: Confirmed → Triaged
Martin Spacek (mspacek) wrote :

By the way, I find this is a transient issue. It went away after a reboot, but perhaps it'll come back after enough suspend/resume cycles, or on some subsequent reboot. Again, smells like a race condition.

Martin Spacek (mspacek) wrote :

On the advice of AlbertoSalvia Novella , I've submitted a new bug report against dbus with links to all the bugs (in my install of Xubuntu 14.04) that I vaguely suspect are related to one another:

Bug #1347272 (DBus communication problems affecting multiple packages)

Changed in policykit-1:
importance: Unknown → High
status: Unknown → Confirmed
Guy (guy-b) wrote :

Hi,

Just to say that it's steel the same after an upgrade 12.04.4 > 14.04.1 :

(polkit-gnome-authentication-agent-1:1810): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

(polkit-gnome-authentication-agent-1:1810): polkit-gnome-1-WARNING **: Failed to register client: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files

Sorry if it's the wrong place to comment.

Guy (guy-b) wrote :

Still present in 14.04.2, will this buggy stuff ever be solved ?

-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/polkit/polkit/issues/30.

Changed in policykit-1:
status: Confirmed → Unknown
stentor007 (wilentz) wrote :

Marcus Naeher has the solution in #17 above

For LXDE it is true as well that the PolicyKit Autostart has been unchecked by default in the latest version of Ubuntu/Lubuntu If you check this box and restart, Synaptic package manager will start from the launchpad menu and will ask for Authentication and all is well. Here is his answer quoted below:

"I have found the solution by happenstance:

(I am using XFCE in German, so maybe the wording I describe here is not 100% accurate)
In the XFCE settings menu -> Session management -> Automatically started applications, there is an Item "Policykit Authentication Agent".
This was unchecked. Re-check, reboot (probably logout and login is sufficient), and it is back working.

But: I am absolutely sure I did not remove the check. On one of the affected computers, I have never been in this dialog before."

Gordon Hay (gordon-haywired) wrote :

This looks like the problem I have in Lubuntu 18.04 (but only in systems upgraded from 16.04 - new installs seem fine).

But I can't find the magic "Policykit Authentication Agent" tickbox in Lubuntu: where is it hiding?

Gordon Hay (gordon-haywired) wrote :

Found the answer - I needed to install lxsession-edit, and that gives me the "Policykit Authentication Agent" tickbox. Now all is well.

One oddity though: on a fresh install of Lubuntu 18.04, everything works as expected - yet the Policykit Authentication Agent box is unchecked... Can anyone explain?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.