polkit-gnome-authentication-agent-1 not started on login

Bug #568748 reported by Jonathan Blackhall
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
dbus (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Binary package hint: policykit-1

I appear to not be getting prompted (by policy kit?) for unlocking administrative tasks, and therefore I cannot access them. I've tried System ->Administration ->Login Screen and System ->Administration ->Time and Date. It's possibly why I'm experiencing this bug as well: https://bugs.launchpad.net/ubuntu/+source/indicator-messages/+bug/568216

I'm attaching a brief screencast. Please let me know if I can do other checking, testing, or provide more info.

Ubuntu Lucid 64-bit with all updates to-date.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: policykit-1 0.96-2
ProcVersionSignature: Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Thu Apr 22 19:06:56 2010
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Beta amd64 (20100406.1)
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: policykit-1

Revision history for this message
Jonathan Blackhall (johnny-one-eye) wrote :
Revision history for this message
Jonathan Blackhall (johnny-one-eye) wrote :

This sounds an awful lot like https://bugs.launchpad.net/ubuntu/+source/policykit-1-gnome/+bug/540247 It may be a duplicate. The only problem is in the end, my situation doesn't appear to be exactly the same. For me, /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 is not running. If I start it manually in terminal, everything goes back to working as expected.

jonathan@jonathan-desktop:~$ /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1

(polkit-gnome-authentication-agent-1:11849): GLib-GObject-WARNING **: cannot register existing type `_PolkitError'

(polkit-gnome-authentication-agent-1:11849): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed

Ok so there everything is working as expected. If I quit the terminal, things go back to the way they were. I then tried some of the debugging near the end of the linked bug report:

jonathan@jonathan-desktop:~$ cat /etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop
[Desktop Entry]
Name=PolicyKit Authentication Agent
Comment=PolicyKit Authentication Agent
Exec=/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
Terminal=false
Type=Application
Categories=
NoDisplay=true
OnlyShowIn=GNOME;XFCE;
X-Ubuntu-Gettext-Domain=polkit-gnome-1

jonathan@jonathan-desktop:~$ ls -l ~/.config/autostart/polkit-gnome-authentication-agent-1.desktop
ls: cannot access /home/jonathan/.config/autostart/polkit-gnome-authentication-agent-1.desktop: No such file or directory

jonathan@jonathan-desktop:~$ cat ~/.config/autostart/polkit-gnome-authentication-agent-1.desktop
cat: /home/jonathan/.config/autostart/polkit-gnome-authentication-agent-1.desktop: No such file or directory

As you can see, I don't have the .config/autostart/polkit-gnome-authentication-agent-1.desktop file in my home folder. (Renaming/deleting this file solved that user's problem).

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Could you attach your ~/.xsession-errors?

Changed in policykit-1 (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
affects: policykit-1 (Ubuntu) → policykit-1-gnome (Ubuntu)
summary: - Policy Kit Unlock not functioning
+ polkit-gnome-authentication-agent-1 not started on login
Revision history for this message
Jonathan Blackhall (johnny-one-eye) wrote :

This is the the one from yesterday. As I booted this morning, it actually appears to be working (i'll attach that one too). Maybe it just crashed or something yesterday...

Revision history for this message
Jonathan Blackhall (johnny-one-eye) wrote :
Changed in policykit-1-gnome (Ubuntu):
status: Incomplete → New
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

From .xesssion-errors.log.old:
** (polkit-gnome-authentication-agent-1:1347): WARNING **: Unable to register authentication agent: Remote Exception invoking org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent() on /org/freedesktop/PolicyKit1/Authority at name org.freedesktop.PolicyKit1: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

And there are lots of errors from every possible program in that file. So it seems that was a D-Bus bug, maybe it crashed before the session started. In that case, nothing is expected to work reliably.

I'm closing the bug since you say you don't experience it anymore, but if it happens, /please/ reopen! Apport should suggest reporting the crash, but if not, we should tackle that manually. Thanks!

Changed in policykit-1-gnome (Ubuntu):
status: New → Invalid
affects: policykit-1-gnome (Ubuntu) → dbus (Ubuntu)
Revision history for this message
Jonathan Blackhall (johnny-one-eye) wrote : Re: [Bug 568748] Re: polkit-gnome-authentication-agent-1 not started on login

> I'm closing the bug since you say you don't experience it anymore, but
> if it happens, /please/ reopen! Apport should suggest reporting the
> crash, but if not, we should tackle that manually. Thanks!

Will do. Thanks again for your help!

Revision history for this message
Holden Hao (holdenhao) wrote :

This problem has affected me also. Lucid AMD64 was installed as an upgrade from an alternate installation of Ubuntu 9.10. The admin account gets the problem above. I created another admin account and it is not affected by the problem. polkit-gnome-authentication-agent-1 is started properly. But it will not start using the old admin account. I have tried removing all config files (directories beginning with a . in their names) but the problem persists. I thought this information can help.

Holden

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Holden: Check your ~/.xsession-errors for the error messages printed above. If you can't find them, please open a new bug.

Revision history for this message
Dave Koelmeyer (davekoelmeyer-b) wrote :

Hi, I have the same or very similar issue on a test Ubuntu 10.04 x86 (not AMD64) system running in a VirtualBox VM. In my case, the system has been patched, then modified lightly to use PAM and LDAP for user login authentication. I actually have another problem in that even when the Policykit agent is running, my valid admin credentials are rejected for desktop apps that use Policykit for authentication, but in the first instance I have a very similar issue as originally described here - the agent is not running automatically for my LDAP users.

I can provide comprehensive information on how I have configured my test system, and if necessary it should be able to be reproduced fairly easily and quickly. My summary however is as follows.

/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 is running for the local admin account login. For LDAP user logins however, it does not run automatically, and I have no autostart directory at all at ~/.config for my LDAP users. The agent can be started manually.

I have attached the contents of a sample LDAP user's ~/.xession-errors file.

Please let me know how best to handle this in terms of bug reporting, if I should file a new bug etc.

Cheers,
Dave

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

> Window manager warning: Failed to read saved session file
Maybe you have a saved session in LDAP accounts that doesn't include polkit-gnome-authentication-agent-1? Please try with a completely clean home.

If that doesn't work, you should start polkit-gnome-authentication-agent-1manually on a LDAP account, and see if it crashes or says something.

Revision history for this message
Dave Koelmeyer (davekoelmeyer-b) wrote :

Hi Milan,

Thanks, and good call. I've cleared out the LDAP user's home directory, and also cleared out /etc/skel from where home directory information was being populated. What I have now is a fresh home directory created on login, and the Policykit agent is still not running once logged in:

dave@ubuntu-desktop:~$ ps -ef | grep policy
root 1032 1 0 23:21 ? 00:00:00 /usr/lib/policykit-1/polkitd
dave 1414 1401 0 23:30 pts/0 00:00:00 grep policy

I have then proceeded to run the agent manually under the same LDAP account login:

dave@ubuntu-desktop:~$ /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1

(polkit-gnome-authentication-agent-1:1422): GLib-GObject-WARNING **: cannot register existing type `_PolkitError'

(polkit-gnome-authentication-agent-1:1422): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed

In spite of the errors, the agent appears to run (no further error output in the terminal window from which the command is running), and I am prompted for authentication when using Ubuntu Software Center to attempt to install and application for example.

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Hm, sorry, I can't really help as I'm no longer using Ubuntu. Have a look at /usr/share/gnome/autostart/gnome-authentication-agent.desktop, and check everything is right there. You may want to copy this file to ~/.config/autostart, but it shouldn't be needed.

Revision history for this message
Dave Koelmeyer (davekoelmeyer-b) wrote :

Hi Milan,

I have since discovered this is a very strange issue with the version of OpenDJ I am running for my directory server, possibly in conjunction with the OpenIndiana host it's running on. I have set up a separate copy of OpenDJ of the same version but running on an Ubuntu host, and with identical settings in my test Ubuntu client except to alter /etc/ldap.conf to point to the second LDAP server, Policykit for LDAP users consistently runs successfully on login.

I wouldn't know what the heck is going on here, but I'll follow up with the OpenDJ folks for a start. Thanks for your help.

Cheers,
Dave

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

Other bug subscribers

Remote bug watches

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