[jaunty] kpackagekit doesn't prompt for user password

Bug #353278 reported by m4v
126
This bug affects 23 people
Affects Status Importance Assigned to Milestone
policykit-kde (Ubuntu)
Fix Released
Medium
Unassigned
Declined for Karmic by Harald Sitter
Nominated for Lucid by nerdy_kid

Bug Description

Binary package hint: kpackagekit

Description: Ubuntu jaunty (development branch)
Release: 9.04

kpackagekit:
  Instalados: 0.4-0ubuntu5
  Candidato: 0.4-0ubuntu5
  Tabla de versión:
 *** 0.4-0ubuntu5 0
        500 http://ar.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

I updated from intrepid to jaunty beta, while testing kpackagekit I noticed It never prompts for user password when root privileges are needed, it just fails with a "you're not root" message after a lengthy delay.

Note that when I need to edit the sources I do get asked for my passwd, but not when I install/remove a package

there's the following error message in ~/.xsession-errors
process 6237: arguments to dbus_set_error() were incorrect, assertion "(error) == NULL || !dbus_error_is_set ((error))" failed in file dbus-errors.c line 363.
This is normally a bug in some application using the D-Bus library.
Authentification error : org.freedesktop.DBus.Error.NoReply : Message did not receive a reply (timeout by message bus)

Revision history for this message
m4v (m4v) wrote :
affects: kpackagekit (Ubuntu) → policykit-kde (Ubuntu)
Revision history for this message
Luis Nogueira (lnogueir-med) wrote :

Same bug here!

Jaunty daily fresh install!

Annoying bug! I need to use terminal to install software or start kpackagekit as root from terminal!

Kpackagekit seems to buggy to became default in juanty! My opinion!

Revision history for this message
d2globalinc (shane-2710studios) wrote :

Having same issue - will not prompt for password - just comes back with Failed message in gui.. Output from terminal is: Select user: Failed to obtain authorization for org.freedesktop.packagekit.system-update.
Authentification error : org.freedesktop.DBus.Error.NoReply : Message did not receive a reply (timeout by message bus)

lines before this show:
Attempting to obtain authorization for org.freedesktop.packagekit.system-update.
Authentication as an administrative user is required.
The following users qualify as administrative users: <with my username listed here>

Same thing happens when trying to apply all available updates, or when trying to open a .deb file from dolphin when it uses KPackageKit.. GDebi works fine and asks for password as normal when opening .deb file using OPEN WITH from dolphin.

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 353278] Re: [jaunty] kpackagekit doesn't prompt for user password

On Wed, 2009-04-29 at 06:23 +0000, d2globalinc wrote:
> Having same issue - will not prompt for password - just comes back with Failed message in gui.. Output from terminal is: Select user: Failed to obtain authorization for org.freedesktop.packagekit.system-update.
> Authentification error : org.freedesktop.DBus.Error.NoReply : Message did not receive a reply (timeout by message bus)
>
> lines before this show:
> Attempting to obtain authorization for org.freedesktop.packagekit.system-update.
> Authentication as an administrative user is required.
> The following users qualify as administrative users: <with my username listed here>
>
> Same thing happens when trying to apply all available updates, or when
> trying to open a .deb file from dolphin when it uses KPackageKit.. GDebi
> works fine and asks for password as normal when opening .deb file using
> OPEN WITH from dolphin.

Could you please try the following from the command line?

  polkit-auth --obtain org.freedesktop.packagekit.system-update

see what happens, and report any messages.

Thanks,

James

Revision history for this message
m4v (m4v) wrote :

> polkit-auth --obtain org.freedesktop.packagekit.system-update

for me it just hangs there without showing any output, after several minutes it will output

Attempting to obtain authorization for org.freedesktop.packagekit.system-update.
Authentication as an administrative user is required.

and continues idling without exiting so I closed with ctrl+c

something seems bugged, I can try the same command with "org.asdasdasd.asdasd" and It will not error out, it will idle several minutes before showing any error messages and exit.

Revision history for this message
James Westby (james-w) wrote :

On Wed, 2009-04-29 at 17:00 +0000, m4v wrote:
> > polkit-auth --obtain org.freedesktop.packagekit.system-update
>
> for me it just hangs there without showing any output, after several
> minutes it will output
>
> Attempting to obtain authorization for org.freedesktop.packagekit.system-update.
> Authentication as an administrative user is required.
>
> and continues idling without exiting so I closed with ctrl+c
>
> something seems bugged, I can try the same command with
> "org.asdasdasd.asdasd" and It will not error out, it will idle several
> minutes before showing any error messages and exit.

Thanks, this suggests something wrong with the session authentication
agent.

Could you please do the above again, but with two extra terminals open,
one running "dbus-monitor --session", the other "dbus-monitor --system"?
I'm most interested in these traces when you get the hang, but having
them for the org.asdasdasd.asdasd case as well might be instructive.

They will output more stuff than just what is going on PolicyKit though,
so you may want to review their outputs to ensure that there is nothing
sensitive within.

Thanks,

James

Revision history for this message
d2globalinc (shane-2710studios) wrote :

I actually get an authentication box pop-up when entering that command - I have both gnome and KDE installed - but using KDE - and what looks like it pop's up is the Gnome Authentication box - Attached png -

Revision history for this message
James Westby (james-w) wrote :

Yep, that looks like GNOME's one. I'd still like to see the dbus-monitor
traces.

Thanks,

James

Revision history for this message
d2globalinc (shane-2710studios) wrote :

- Ok - not sure if the issue still exists now - I did the dbus-monitor traces, then did the "polkit-auth --obtain org.freedesktop.packagekit.system-update" - I was presented with the gnome authentication window - I closed it this time and did not authenticate.. I then tried to capture the same dbus-monitor traces, when opening a .deb file and clicking to install it - this time it opened the authentication window - instead of telling me I didn't have the permission to install.. I'll continue to test today and let you know if the problem comes back - if it does I'll capture the dbus-monitor traces -

These are the dbus-monitor traces attached to this post when doing the polkit-auth command..

Revision history for this message
gwydion.dot (gwydion-dot) wrote :

Updated today the kpackagekit, still the same error.

Revision history for this message
gwydion.dot (gwydion-dot) wrote :
Revision history for this message
gwydion.dot (gwydion-dot) wrote :

kpackagekit is still broken!

Revision history for this message
m4v (m4v) wrote :

I'm sorry that I didn't reply to this bug for a while, I reinstalled kubuntu 9.04 in another partition and saw that kpackagekit works, so is this probably an issue with the intrepid to jaunty update? I have been using that install since then.

I still have my old kubuntu in another partition, I'll see to boot in and provide the requested output.

Revision history for this message
gwydion.dot (gwydion-dot) wrote :

I have a new installation and this problem.
There must be somewhere else the cause of this.

Revision history for this message
m4v (m4v) wrote :

My new install is a 64bits one, when kpackagekit failed I was using 32bits jaunty, maybe is related?

Revision history for this message
gwydion.dot (gwydion-dot) wrote :

I have the AMD64 version installed.
When someone can tell me which lib is used for the checking of the the privileges I can have a look at it.

But the only stuff I found was

if(transaction *t...){systemupadte(...)}
else{//permission error message}

transaction is froma lib, but I don't know which one.

Revision history for this message
gwydion.dot (gwydion-dot) wrote :

      if ( Transaction *t = m_client->updateSystem() ) {
            KpkTransaction *frm = new KpkTransaction(t, KpkTransaction::Modal | KpkTransaction::CloseOnFinish, this);
            connect(frm, SIGNAL(kTransactionFinished(KpkTransaction::ExitStatus)),
                    this, SLOT(displayUpdates(KpkTransaction::ExitStatus)));
            frm->show();
        } else {
            KMessageBox::sorry(this,
                               i18n("You don't have the necessary privileges to perform this action."),
                               i18n("Failed to update system"));
        }

Yay, I found it again.

"if ( Transaction *t = m_client->updateSystem() ) "
"if ( Transaction *t = Client::instance()->installFiles(files, true))"

"PackageKit::Transaction" Ok, here we use packagekit.

updateSystem() will do this:

Transaction* Client::updateSystem()
{
 if(!PolkitClient::instance()->getAuth(AUTH_SYSTEM_UPDATE)) {
  emit authError(AUTH_SYSTEM_UPDATE);
  return NULL;
 }

 Transaction* t = d->createNewTransaction();

 t->d->p->UpdateSystem();

 return t;
}

A sweet bool:
bool getAuth(const QString& action);

Some more about getAuth().
#ifdef USE_SECURITY_POLKIT
bool PolkitClient::getAuth(const QString &action) {
 DBusError e;
 dbus_error_init(&e);

 if(polkit_check_auth(QCoreApplication::applicationPid(), action.toAscii().data(), NULL))
  return true;

 bool auth = polkit_auth_obtain(action.toAscii().data(), 0, QCoreApplication::applicationPid(), &e);
 if(!auth) {
  qDebug() << "Authentification error :" << e.name << ":" << e.message;
 }

 return auth;
}
#else
bool PolkitClient::getAuth(const QString &action) {
 qDebug() << "Not configured with PolicyKit support";
 return false;
}
#endif

Now, the big question, why it will not work?

Revision history for this message
gwydion.dot (gwydion-dot) wrote :

$ polkit-auth --show-obtainable
com.ubuntu.devicedriver.install

Can someone post the output polkit-auth --show-obtainable of too please?

Revision history for this message
ronwilhoite (ronwilhoite) wrote :

$ polkit-auth --show-obtainable
com.ubuntu.devicedriver.install

$ polkit-auth --obtain org.freedesktop.packagekit.system-update
$

just returns a prompt with no output.

The Refresh command on Software Updates still returns "You don't have the necessary privileges to perform this action."

Revision history for this message
Steve Kroon (kroon) wrote :

OK - I believe this may be the same problem: in Kubuntu's "Software Updates - KDE Control module", when I click on "Apply all available updates", I get the error message "You don't have the necessary privileges to perform this action."

Running sudo aptitude safe-upgrade works fine though.

Running polkit-auth --obtain org.freedesktop.packagekit.system-update prompts for a username and password, asks whether it should keep the privilege, and then outputs "Successfully obtained the authorization for org.freedesktop.packagekit.system-update."

I still get the same error message in the Software Updates window, though.

Please let me know if you want any other info.

Revision history for this message
Leo Milano (lmilano) wrote :

Same here. I know there were some questions about architecture above, so let me add my info: fresh install of Jaunty on amd64. This has been widely reported in kubuntuforums.net, and is seriously affecting new users, who need to be told to ignore the tool, or use the command line, or other workarounds. We need to fix this ASAP.

Best,
Leo

Revision history for this message
James Westby (james-w) wrote :

Hi,

I think that I've cracked part of the mystery.

Could someone seeing this problem try the packages from

  https://edge.launchpad.net/~james-w/+archive/polkit

then run from the command line and report the output that they
get. I hope that we will get some more clue about what is going
on.

If not then restarting your session, reproducing the bug, and then
attaching your ~/.xsession-errors would help.

Thanks,

James

Changed in policykit-kde (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Steve Kroon (kroon) wrote :

OK. I reproduced the bug, and as with others, I get this error message:

Authentication as an administrative user is required.
The following users qualify as administrative users: skroon
Select user: Failed to obtain authorization for org.freedesktop.packagekit.system-update.
Authentification error : org.freedesktop.DBus.Error.NoReply : Message did not receive a reply (timeout by message bus)

Nothing was output to my ~/.xsession-errors , however.

I also ran polkit-auth as below, which didn't seem to have any problem:

skroon@mania:~$ polkit-auth --obtain org.freedesktop.packagekit.system-update
Attempting to obtain authorization for org.freedesktop.packagekit.system-update.
Authentication as an administrative user is required.
The following users qualify as administrative users: skroon
Select user: skroon
Password:
Keep this privilege for the session or always? [no/session/always]?
no
Successfully obtained the authorization for org.freedesktop.packagekit.system-update.

Finally, this problem went away for some reason on my second try yesterday, but has since come back. Not sure why.

@James: when adding your repositories above and running apt-get update, I get the following at the end:

W: GPG error: http://ppa.launchpad.net jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB6DA76C6591493A
W: You may want to run apt-get update to correct these problems

(Ironically, it's recommending running the currently running program to fix the problem).

I'm hesitant to continue before sorting these warnings out.

Revision history for this message
Leo Milano (lmilano) wrote :

@James: FIXED! Your packages simply fixed it here:

* I added you ppa @ my sources.list
* Updated from Synaptic, and I got the Icon from Update Notifier on my sys tray
* Of course, these updates were your packages, and Update Notifier failed to upgrade (I just did it to make sure the bug was still there)
* I used synaptic to upgrade the Pol Kit stuff from your ppa
* I added the unsupported updates repo temporarily to see some new stuff, the update notifier icon showed up again
* This time, though, I was able to update (the auth dialog popped up in her glory). BINGO!

Excellent work. Of course we need some more people to test before committing the patch, but most likely this is it.

Cheers,
Leo

Revision history for this message
James Westby (james-w) wrote :

Leo Milano wrote:
> @James: FIXED! Your packages simply fixed it here:
>
> * I added you ppa @ my sources.list
> * Updated from Synaptic, and I got the Icon from Update Notifier on my sys tray
> * Of course, these updates were your packages, and Update Notifier failed to upgrade (I just did it to make sure the bug was still there)
> * I used synaptic to upgrade the Pol Kit stuff from your ppa
> * I added the unsupported updates repo temporarily to see some new stuff, the update notifier icon showed up again
> * This time, though, I was able to update (the auth dialog popped up in her glory). BINGO!
>
> Excellent work. Of course we need some more people to test before
> committing the patch, but most likely this is it.

Erm, that's odd, it shouldn't have fixed it :-)

It was only supposed to help in getting some more debug information.

I've just realised that I uploaded the packages based on the karmic
versions, so there were more changes than I expected. I just uploaded
new ones with just the one change so we can narrow down what happened.

Could you now do the following:

  * Downgrade to the released packages in jaunty and check the bug is
    still there. (if it isn't something weird is going on).

  * Install the +jw3 packages from that PPA and see if they fix it. If
    they do then that patch does more than I expect, if not then it's
    something fixed in karmic, so we can work out what.

Thanks,

James

Revision history for this message
James Westby (james-w) wrote :

oops, make that +jw4 packages.

Revision history for this message
Leo Milano (lmilano) wrote :

Arrg, I hate to say this (as weird as it sounds) but it's still fixed with the jw4 packages

Here are the related packages and versions:

lmilano@grisell:~$ dpkg --list |grep -i poli
ii dc 1.06.94-3ubuntu1 The GNU dc arbitrary precision reverse-polish calcu
ii libpolkit-dbus2 0.9-2ubuntu1+jw4 library for accessing PolicyKit via D-Bus
ii libpolkit-gnome0 0.9-1ubuntu3 PolicyKit-gnome library
ii libpolkit-grant2 0.9-2ubuntu1+jw4 library for obtaining privileges via PolicyKit
ii libpolkit2 0.9-2ubuntu1+jw4 library for accessing PolicyKit
ii libsepol1 2.0.30-2ubuntu1 Security Enhanced Linux policy library for changing
ii policykit 0.9-2ubuntu1+jw4 framework for managing administrative policies and
ii policykit-gnome 0.9-1ubuntu3 GNOME dialogs for PolicyKit
ii policykit-kde 0.0+svn920907-0ubuntu1 KDE dialogs for PolicyKit

Revision history for this message
Leo Milano (lmilano) wrote :

Also, perhaps not surprisingly , running polkit-auth from the shell works just fine (I get the auth popup)

polkit-auth --obtain org.freedesktop.packagekit.system-update

Cheers!
Leo

Revision history for this message
James Westby (james-w) wrote :

Leo Milano wrote:
> Arrg, I hate to say this (as weird as it sounds) but it's still fixed
> with the jw4 packages

That's not necessarily a bad thing :-)

Could you please verify that the bug comes back if you force downgrade
to the jaunty packages?

  sudo aptitude install libpolkit-dbus2=0.9-2ubuntu1 \
     libpolkit-grant2=0.9-2ubuntu1 libpolkit2=0.9-2ubuntu1 \
     policykit=0.9-2ubuntu1

should do it.

If the bug comes back then I will look a bit more at my patch and work
out what it is really doing :-)

Thanks,

James

Revision history for this message
Leo Milano (lmilano) wrote :

Surprise, the bug is _still_ gone after downgrading those packages (and I am sure they were downgraded). In fact, I rebooted after trying again, because I was afraid there could be some environment variable still hanging from your new packages.

I also tried to to purge all policiykit packages from Synaptic, and reinstall the ones from the ubuntu repos, because I have the feeling that your new packages might have left some residual config files somewhere that make it work even with the older packages. But too many things depend on policikit, purging policykit would wipe most of my install.

I see if I can force a purge from the command line, just the four packages you mentioned (without checking for dependencies). I am sure one of the 500 flags for apt-get does that :-) Maybe you know exactly and you are around :-)

Thanks for all the work!

Revision history for this message
James Westby (james-w) wrote :

Leo Milano wrote:
> Surprise, the bug is _still_ gone after downgrading those packages (and
> I am sure they were downgraded). In fact, I rebooted after trying again,
> because I was afraid there could be some environment variable still
> hanging from your new packages.
>
> I also tried to to purge all policiykit packages from Synaptic, and
> reinstall the ones from the ubuntu repos, because I have the feeling
> that your new packages might have left some residual config files
> somewhere that make it work even with the older packages. But too many
> things depend on policikit, purging policykit would wipe most of my
> install.
>
> I see if I can force a purge from the command line, just the four
> packages you mentioned (without checking for dependencies). I am sure
> one of the 500 flags for apt-get does that :-) Maybe you know exactly
> and you are around :-)

You can do --force-depends, but I don't think that's necessary.

Your findings suggest that just re-installing may fix the issue.

Can anyone else confirm that reinstalling the policykit-related
packages fixes the issue?

Thanks,

James

Revision history for this message
Leo Milano (lmilano) wrote :

Yes, you are right! I purged them (with -force-depends in dpkg), install them with apt-get from the official repo, and they are working fine. I didn't reboot, but I logged out and in before testing. I am sure that would clean up anything in memory.

So, it must be something about the order in which the post-install scripts are executed, right? It would be nice to understand exactly what's going on and fix it for good :-)

I hope someone here can try your suggestion to confirm (I'll ask the folks in kubuntuforums.net, too)

sudo apt-get install --reinstall libpolkit-dbus2 libpolkit-grant2 libpolkit2 policykit

Revision history for this message
Steve Kroon (kroon) wrote :

I did this reinstall, but still have the bug.

Revision history for this message
Steve Kroon (kroon) wrote :

Update: after reinstalling, I clicked on my "Update notifier" icon, and got the bug. I then quit update notifier, and ran KPackageKit from the menu. There, clicking on "apply all available updates" gave me a login prompt. So I've got different behaviour between kpackagekit and updatenotifier (which seems to be a component of kpackagekit to me).

Revision history for this message
Leo Milano (lmilano) wrote :

Steve, could you please try two things?

1. Go back now to updatenotifier and see if the bug is still there?
2. Install the packages from James' PPA and see if you still see the bug?

One way to see updates in the system is to temporarily enable the "proposed" and/or "backports" updates.

Thanks!
Leo

PS: updating to PPA definitely fixed my issue in the notifier.

Revision history for this message
Steve Kroon (kroon) wrote :

I'll followup on Item 1 as soon as the update notifier pops up again (my system is currently up to date).

As for item 2, I'm still waiting for feedback on the certificate issue I get when I add the repositories.

Revision history for this message
gwydion.dot (gwydion-dot) wrote :

Bug not fixed here.
Installed the package from ppa and restarted the xsession.
Still the same problem here.

ii dc 1.06.94-3ubuntu1 The GNU dc arbitrary precision reverse-polis
ii libpolkit-dbus2 0.9-2ubuntu1 library for accessing PolicyKit via D-Bus
ii libpolkit-gnome0 0.9-1ubuntu3 PolicyKit-gnome library
ii libpolkit-grant2 0.9-2ubuntu1 library for obtaining privileges via PolicyK
rc libpolkit-qt0 0.9.2+svn966498-0ubuntu1 PolicyKit-qt library
ii libpolkit2 0.9-2ubuntu1 library for accessing PolicyKit
ii libsepol1 2.0.30-2ubuntu1 Security Enhanced Linux policy library for c
ii policykit 0.9-2ubuntu1 framework for managing administrative polici
ii policykit-gnome 0.9-1ubuntu3 GNOME dialogs for PolicyKit
ii policykit-kde 0.0+svn920907-0ubuntu1 KDE dialogs for PolicyKit

Revision history for this message
Steve Kroon (kroon) wrote :

@Leo: Regarding your query 1: the bug is still there in update notifier. I basically repeated the process in my comment above today, and got the same behaviour. [I have the "remember this password" options unchecked].

Revision history for this message
Steve Kroon (kroon) wrote :

*bump* Is anyone still working on this? It doesn't seem to be assigned to anyone.

Revision history for this message
Steve Kroon (kroon) wrote :

This bug seems to be in limbo - it's confirmed, but unassigned. Does anyone know if there's someone responsible for assigning confirmed bugs?

@James Westby: please see my comment 23 on this bug - I'd like to test your suggestions, but need to find out what to do about certificate warnings before I can do that.

Revision history for this message
James Westby (james-w) wrote :

Hi Steve,

I'm pretty stumped by this bug, so haven't had any other suggestions to
give. Assignment is generally self-elected if someone wants to claim
a bug to work on, so there's no-one responsible for it.

Apologies for missing your comment. You can fix that warning
with something like

    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EB6DA76C6591493A

Thanks,

James

Revision history for this message
Steve Kroon (kroon) wrote :

@Leo, James

I installed the policykit from James' PPA, and the bug is still there (i.e. update-notifier tells me I don't have privileges, rather than prompting for username and password.

However, I found out that when I run update-notifier-kde on the command-line, at the stage where I usually get this error message, there is a prompt for user information on the command line. Filling that in works, and the upgrade goes through. Here's a transcript:

skroon@mania:~$ update-notifier-kde
9;6kcmshell(14690) KpkTransactionBar::setBehaviors: Hide! 1
New transaction with tid "/151_abdcacac_data"
New transaction with tid "/152_deaabdbc_data"
removing transaction from pool : "/151_abdcacac_data"
removing transaction from pool : "/152_deaabdbc_data"
Attempting to obtain authorization for org.freedesktop.packagekit.system-update.
Authentication as an administrative user is required.
The following users qualify as administrative users: skroon
Select user: skroon
Password:
Keep this privilege for the session or always? [no/session/always]?
no
Successfully obtained the authorization for org.freedesktop.packagekit.system-update.
New transaction with tid "/153_abedadad_data"
enumFromString ( State ) : converted "" to "" , enum value -1
enumFromString ( RestartType ) : converted "unknown" to "RestartUnknown" , enum value -1
New transaction with tid "/154_eacabaca_data"
New transaction with tid "/155_bbbbedcd_data"
removing transaction from pool : "/153_abedadad_data"
removing transaction from pool : "/154_eacabaca_data"
0;0removing transaction from pool : "/155_bbbbedcd_data"

Revision history for this message
James Westby (james-w) wrote :

On Thu Sep 17 14:03:13 UTC 2009 Steve Kroon wrote:
> However, I found out that when I run update-notifier-kde on the command-
> line, at the stage where I usually get this error message, there is a
> prompt for user information on the command line. Filling that in works,
> and the upgrade goes through. Here's a transcript:

Thanks Steve, that's great information.

Do you have policykit-kde installed?

Are you using any backport PPAs of later KDE versions?

Thanks,

James

Revision history for this message
Steve Kroon (kroon) wrote :

1) Policykit-kde is not installed, it seems:

skroon@mania:~$ sudo aptitude show policykit-kde
[sudo] password for skroon:
Package: policykit-kde
New: yes
State: not installed
Version: 0.0+svn920907-0ubuntu1
Priority: extra
Section: libs
Maintainer: Kubuntu Developers <email address hidden>
Uncompressed Size: 459k
Depends: kdebase-runtime (>= 4:4.1.96), kdelibs5 (>= 4:4.1.96), libc6 (>= 2.4), libdbus-1-3 (>= 1.0.2), libgcc1 (>= 1:4.1.1), libglib2.0-0 (>= 2.12.0),
         libpolkit-dbus2 (>= 0.7), libpolkit-grant2 (>= 0.7), libpolkit2 (>= 0.8), libqt4-dbus (>= 4.4.3), libqt4-svg (>= 4.4.3), libqt4-xml (>= 4.4.3), libqtcore4
         (>= 4.4.3), libqtgui4 (>= 4.4.3), libstdc++6 (>= 4.1.1)
Description: KDE dialogs for PolicyKit
 PolicyKit-Kde provides a D-Bus session bus service that is used to bring up authentication dialogs used for obtaining privileges.

2) Erm, I don't what "backport PPAs" means, so I guess that's a no!

Revision history for this message
James Westby (james-w) wrote :

On Thu Sep 17 15:15:56 UTC 2009 Steve Kroon wrote:
> 1) Policykit-kde is not installed, it seems:

Ok, if you install that package does the problem go away?

Thanks,

James

Revision history for this message
Steve Kroon (kroon) wrote :

Yes. I installed policykit-kde, and now an authentication pop-up appears.

Revision history for this message
Steve Kroon (kroon) wrote :

I'm downgrading my policykit back to version 0.9-2ubuntu1 from James' PPA version. I'll report later if it stills work with the original version.

Revision history for this message
James Westby (james-w) wrote :

On Mon Sep 21 07:44:15 UTC 2009 Steve Kroon wrote:
> Yes. I installed policykit-kde, and now an authentication pop-up
> appears.

Good.

I am curious how you didn't have policykit-kde installed given that kpackagekit
depends on it?

Thanks,

James

Revision history for this message
Steve Kroon (kroon) wrote :

I don't know - all previous upgrades I've just done what aptitude/the updater recommended.

OK, I looked at:

skroon@mania:~$ sudo aptitude show kpackagekit
Package: kpackagekit
New: yes
State: installed
Automatically installed: no
Version: 0.4-0ubuntu8.1
Priority: extra
Section: libs
Maintainer: Kubuntu Developers <email address hidden>
Uncompressed Size: 774k
Depends: kdebase-runtime (>= 4:4.2.1), kdelibs5 (>= 4:4.2.1), libc6 (>= 2.1.3), libgcc1 (>= 1:4.1.1), libpackagekit-qt11, libqt4-dbus (>= 4.5.0~+rc1), libqt4-network
         (>= 4.5.0~+rc1), libqt4-svg (>= 4.5.0~+rc1), libqt4-xml (>= 4.5.0~+rc1), libqtcore4 (>= 4.5.0~+rc1), libqtgui4 (>= 4.5.0~+rc1), libstdc++6 (>= 4.1.1),
         policykit-kde | policykit-gnome, software-properties-kde, packagekit (>= 0.3.14-0ubuntu3)
Description: KDE package management tool using PackageKit
 PackageKit allows to perform simple software management tasks over a DBus interface e.g. refreshing the cache, updating, installing and removing software packages
 or searching for multimedia codecs and file handlers.

 This package provides a package manager and a update notifier.
Homepage: http://www.packagekit.org

This indicates a dependency on policykit-kde OR policykit-gnome. And apparently I do have policykit-gnome installed (it's marked for Automatic installation):

skroon@mania:~$ sudo aptitude show policykit-gnome
Package: policykit-gnome
State: installed
Automatically installed: yes
Version: 0.9-1ubuntu3
Priority: optional
Section: gnome
Maintainer: Ubuntu Core Developers <email address hidden>
Uncompressed Size: 643k
Depends: libc6 (>= 2.4), libdbus-1-3 (>= 1.0.2), libdbus-glib-1-2 (>= 0.71), libgconf2-4 (>= 2.13.5), libglib2.0-0 (>= 2.18.0), libgnomevfs2-0 (>= 1:2.17.90),
         libgtk2.0-0 (>= 2.15.0), libpolkit-dbus2 (>= 0.7), libpolkit-gnome0 (>= 0.7), libpolkit-grant2 (>= 0.7), libpolkit2 (>= 0.8), libsexy2 (>= 0.1.8), policykit,
         dbus-x11
Description: GNOME dialogs for PolicyKit
 PolicyKit-gnome provides a D-Bus session bus service that is used to bring up authentication dialogs used for obtaining privileges.
Homepage: http://hal.freedesktop.org/docs/PolicyKit-gnome/

Tags: implemented-in::c, interface::x11, role::program, security::authentication, suite::gnome, uitoolkit::gtk

Revision history for this message
James Westby (james-w) wrote :

On Tue Sep 22 06:06:19 UTC 2009 Steve Kroon wrote:
> This indicates a dependency on policykit-kde OR policykit-gnome. And
> apparently I do have policykit-gnome installed (it's marked for Automatic
> installation):

Ah, spotted. That means you should have been getting the GNOME prompt at
least. Do you have file:

/usr/share/dbus-1/services/gnome-org.freedesktop.PolicyKit.AuthenticationAgent.service

?

Thanks,

James

Revision history for this message
Steve Kroon (kroon) wrote :

Yes, I do:

skroon@mania:~$ cat /usr/share/dbus-1/services/gnome-org.freedesktop.PolicyKit.AuthenticationAgent.service
[D-BUS Service]
Name=org.freedesktop.PolicyKit.AuthenticationAgent
Exec=/usr/lib/policykit-gnome/polkit-gnome-manager

It might be worth noting that in comment #34, I pointed out that kpackagekit itself was prompting me originally, but the update-notifier component wasn't. Perhaps that component doesn't call the gnome stuff if it's not invoked from within kpackagekit?

Revision history for this message
James Westby (james-w) wrote :

On Tue Sep 22 10:14:09 UTC 2009 Steve Kroon wrote:
> Perhaps that component doesn't call the gnome stuff
> if it's not invoked from within kpackagekit?

I don't really see how that is possible. If it is using the kde one
then it should be equally as happy using the GNOME one.

Thanks,

James

Revision history for this message
Steve Kroon (kroon) wrote :

It was just a guess. Anything else I can check for you?

Revision history for this message
Marián Kadaňka (marian.kadanka) wrote :

Happens to me on almost fresh install of Kubuntu 9.10 beta in vmware virtual machine.
Accessing "Add and remove software" through systemsettings, and trying to click "refresh" in "software updates" it gives me error dialog "You do not have the necessary privileges to perform this action." - no password prompt at all.
Accessing "Policykit Authorization" through systemsettings gives empty error dialog and empty configuration window.
No problem occurred in alpha 6 since I last checked it one week before beta release.

Revision history for this message
Leo Milano (lmilano) wrote :

On Friday 02 October 2009, Ladislav Bonita wrote:
> Happens to me on almost fresh install of Kubuntu 9.10 beta in vmware virtual machine.
> Accessing "Add and remove software" through systemsettings, and trying to click "refresh" in "software updates" it gives me error dialog "You do not have the necessary privileges to perform this action." - no password prompt at all.

Yes, it happens to me too, in kubuntu-netbook 9.10 beta (in the live CD/USB).

Revision history for this message
Peace75 (markspost) wrote :

I am also getting this error and following installation failure as described by 'Ladislav Bonita'. This is from a fresh BETA installation, NO password prompt......updates cannot be applied.

Revision history for this message
Douglas (glyphe) wrote :

This happened to me on a fresh install of Kubuntu 9.10. No updates possible through kpackagekit but still able to apply updates through aptitude. Noticed previous users had disappear with installing policykit-kde. No such package installed or available however there was one for just a policykit which I installed through aptitude and it resolved the kpackagekit and Policykit Authorization (in system settings) issues.

Revision history for this message
Sanjaya Karunasena (sanjayak) wrote :

I confirm what Douglas wrote. I had the same issue and installing "policykit" resolved the issue.

Revision history for this message
Marián Kadaňka (marian.kadanka) wrote :

Yes, "apt-get install policykit" solved the problem.

Revision history for this message
Leo Milano (lmilano) wrote :

Me too. So, this seems like a packaging error in KPackageKit, shouldn't it have policykit as a dependency? Is anyone reading this able to patch this?

Thanks!

Revision history for this message
Amol (amolmodi) wrote :

I ended up with the same problem in the new Karmic Beta, with the easy fix of apt-get install policykit. I don't understand why this isn't a dependency of kpackagekit and installed by default.

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Newcomers are experiencing bug 442263.

Revision history for this message
Leo Milano (lmilano) wrote :

It seems to me that the original bug has been fixed with the newest packages. At least in all my hardware (Jaunty 9.04 64, Jaunty 32 bit and Karmic 32 bit, latest updates), and for what I read above this is generally fixed, although it is not clear which svn commit did it. Would everyone agree? Should we close this bug? If no one objects, I will mark this as FIXED in a few days.

There is a separate bug related to packaging (missing policykit). Is that fixed? I wasn't hit with a fresh karmic install I made recently (although that was a bit custom: net-install of abase system + kde-minimal + kpackagekit. Any thoughts on that? Is it fixed or does it need to be reported (separately) ?

@Jonathan: I am not really sure what you mean by "Newcomers are experiencing bug 442263." Could you please elaborate a bit?

Thanks!

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Newcomers are experiencing a bug with similar symptoms. The problem for bug 442263 is that policykit-kde (from kdebase-workspace) was not installed, totally different from the symptoms reported here, where the prompt never showed up even with policykit-kde installed.

Revision history for this message
Steve Kroon (kroon) wrote :

With reference to my comment #47, downgrading from James' version of policykit to my original version (policykit-0.9-2ubuntu1) broke my software updates module again, despite the fact that policykit-kde is now installed.

So the fix seems to be some mix of the two.

Sorry for the long delay for this feedback.

Revision history for this message
mogwai (scruffy-mogwai) wrote :

This still affects me out-of-the-box with the release candidate of Kubuntu 9.10.

Revision history for this message
mogwai (scruffy-mogwai) wrote :

Sorry, that is with or without the latest updates (as at 26 Oct).

Revision history for this message
Marián Kadaňka (marian.kadanka) wrote :

No problem here anymore, with fresh install of Kubuntu 9.10 RC

Revision history for this message
mogwai (scruffy-mogwai) wrote :

Latest updates (@27 Oct 17:05 GMT+12) and a restart seems to have fixed this for me.

Revision history for this message
Leo Milano (lmilano) wrote :

Mogwai: was policykit-kde installed while you were having issues? We are trying to determine whether this bug can be cclosed, at least for Karmic.

Steve: are you still in Jaunty? Is it still broken with the latest Jaunty packages? (I know it was with the original ones)

Thanks!

Revision history for this message
Steve Kroon (kroon) wrote :

Hi Leo. Last time I used it it was broken, but then I committed about 150 updates, and now I'm waiting for the next updates before I can tell. Presumably Karmic's updates will come later this week, and then I can let you know if it worked or not.

Revision history for this message
Steve Kroon (kroon) wrote :

Update: it worked fine for me with my next updates.

I've upgraded to Karmic now, so am unable to do any more Jaunty tests...

Revision history for this message
Leo Milano (lmilano) wrote :

Thank you Steve!

The original bug appears to be fixed in Jaunty+updates and in Karmic, so I will be closing it.

There is another (similar but unrelated bug) as pointed out by Jonathan above. That other bug (probably fixed by now) has to do with policykit not being installed when KPackageKit is selected for installation (even though it is required). Please refer to that other bug report if that's affecting you.

Cheers all!
Leo

Changed in policykit-kde (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Blackpaw (blackpaw) wrote :

I'm seeing a regression of this bug in Karmic, KDE 4.4.1

Qt: 4.6.2
KDE Development Platform: 4.4.1 (KDE 4.4.1)

All updates + backports

Revision history for this message
Nebelmann (nebelmann) wrote :

Same problem here. I have the same versions as Blackpaw.

Revision history for this message
Lynx (lynx-ua) wrote :

Same problem.
KDE 4.4.1
All updates and Backports

Changed in policykit-kde (Ubuntu):
status: Fix Released → New
Revision history for this message
Stephen Monteith (stephen-monteith) wrote :

I can confirm I'm also seeing this regression. Also policykit-kde is not even available as a package. If I install policykit-gnome then I am prompted for a password from kpackagekit on software install/upgrades.

sudo aptitude show policykit-kde
No current or candidate version found for policykit-kde
Package: policykit-kde
State: not a real package

sudo aptitude show kpackagekit
Package: kpackagekit
New: yes
State: installed
Automatically installed: no
Version: 0.4.2-0ubuntu3
Priority: extra
Section: libs
Maintainer: Kubuntu Developers <email address hidden>
Uncompressed Size: 2,839k
Depends: kdebase-runtime (>= 4:4.3.2), kdelibs5 (>= 4:4.3.2), libc6 (>= 2.1.3),
         libgcc1 (>= 1:4.1.1), libpackagekit-qt11, libqt4-dbus (>= 4.5.1),
         libqt4-network (>= 4.5.1), libqt4-sql (>= 4.5.1), libqt4-svg (>=
         4.5.1), libqt4-xml (>= 4.5.1), libqtcore4 (>= 4.5.1), libqtgui4 (>=
         4.5.1), libstdc++6 (>= 4.1.1), kdebase-workspace-bin,
         software-properties-kde, packagekit (>= 0.4.7)
Provides: packagekit-kde
Description: KDE package management tool using PackageKit
 PackageKit allows to perform simple software management tasks over a DBus
 interface e.g. refreshing the cache, updating, installing and removing
 software packages or searching for multimedia codecs and file handlers.

 This package provides a package manager and a update notifier.
Homepage: http://www.packagekit.org

Revision history for this message
Blackpaw (blackpaw) wrote :

Thanks Stephen, yah installing policykit-gnome solved the issue for me, though the password prompt is the gnome one. I guess a packing issue for Karmic/KDE 4.4.1?

Revision history for this message
Leo Milano (lmilano) wrote :

Wow! I am running latest Lucid and I just realized that policykit-kde is not available for Lucid, either!
This is the behavior:

* policykit-1-gnome is installed
* If I open KPackageKit and select updates, I can install them with NO authentication! (Is this expected?)
* If I install new packages I do get a prompt (I guess the gnome version), which actually asks me what user to use for sudo'ing (that's nice).

Should we file a packaging bug for the missing policykit-kde?

Revision history for this message
Sel Goona (alieneye) wrote :

@Leo Milano:

>> Should we file a packaging bug for the missing policykit-kde?

With Karmic + KDE 4.4.0, policykit-kde also is missing (lol, I dont noticed that before.), but the KDE´ish policykit authorization dialog appears.

I'm glad policykit-gnome is working, until the problem is resolved.

Revision history for this message
nerdy_kid (nerdy-kid) wrote :

the dialog did work in KDE 4.4, upgraded to KDE 4.4.1 and back to GNOME dialogs. policykit-kde was replaced by kdebase-workspace-bin and kdebase-workspace-data according to apt. This bug has been open since 2009 and it still hasnt been fixed?

Revision history for this message
Leo Milano (lmilano) wrote :

@nerdy_kid: I believe this bug HAS been fixed, and I marked it as such above. However, Lynx marked this as NEW again, and undid this.

I think the confusion has to do with what this bug is about, although it was explained above by Jonathan in post #64. We need a new bug report for the missing policykit-kde, and close this one. If anyone has the time please go ahead and link from here (I'll do the same if I get a little time to do it)

Changed in policykit-kde (Ubuntu):
status: New → Fix Released
Revision history for this message
Jesse Sweetland (sweetlandj) wrote :

I got linked here from another bug marked as a duplicate of this one. I don't know of a better place to report this--if there is, please let me know...

I've been running Kubuntu Lucid since Beta 1 and I think in that distribution policykit-1-kde wasn't ready yet ... it came in some later update. I've installed and re-installed it and the base policykit-1 package and I experience the same results. (In fact, I did a purge on policykit-1-kde, which removed several hundred packages including kde-workspace-bin. I immediately re-installed the affected packages and rebooted--so far so good. Still experiencing the same behavior with respect to kpackagekit.)

Symptoms are this:
 - policykit-1 is installed, as are policykit-1-kde and policykit-1-gnome
 - polkitd is running
 - polkit-kde-authentication-agent-1 is running
 - /usr/share/dbus-1/services/gnome-org.freedesktop.PolicyKit.AuthenticationAgent.service does not exist
 - /etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop exists
 - /etc/xdg/polkit-kde-authentication-agent-1.desktop exists
 - ~/.config/autostart/ is empty
 - polkit-auth --obtain org.freedesktop.packagekit.system-update outputs the following and immediate returns with exit status 1:

Attempting to obtain authorization for org.freedesktop.packagekit.system-update.
polkit-grant-helper: given auth type (1 -> no) is bogus
Failed to obtain authorization for org.freedesktop.packagekit.system-update.
Attempting to obtain authorization for org.freedesktop.packagekit.system-update.
polkit-grant-helper: given auth type (1 -> no) is bogus
Failed to obtain authorization for org.freedesktop.packagekit.system-update.

 - There is nothing in /var/log/auth.log related to this and nothing that I can see in .xsession-errors.
 - I do not even get the Gnome authentication dialog

If I run "kdesudo kpackagekit" then I can install packages without being prompted for a password. Without kdesudo it says "Waiting for Authentication" and times out after 5 minutes or so with a "Failed to authenticate" message. I am also unable to update the clock.

I don't get prompted for a password at all to apply updates and updates install without a problem. I do get prompted for a password when running the file sharing configuration and in a few other places.

Revision history for this message
gwydion.dot (gwydion-dot) wrote :

I have a simply solution for you: Change the an other distribution.
Ubuntu developers are not interested to fix anything that has to do with kde.

I don't know where the problem is, but it seems when they can't copy & past the patches from debian, they have no idea how to fix things.

Best thing to do is simply change to a distribution thats support kde fully and the devs are fixing stuff itself.

Revision history for this message
Jesse Sweetland (sweetlandj) wrote :

I can't fault the Ubuntu developers for this. It looks like some serious changes were made with respect to packaging in 10.04 and I'm hobbling along on a copy of Beta 1. Just trying to do my part to help troubleshoot the issue. I expect that if I did a clean RC install I wouldn't have any issues, but I was hoping maybe I had something new to add or that my particular problem (missing D-Bus service) has an easy fix.

Speaking of which ... does anyone have any insight on why the D-Bus service is AWOL? I think if I can figure that out then everything will magically start working for me...

Revision history for this message
Jesse Sweetland (sweetlandj) wrote :

Just noticed that I have org.freedesktop.PolicyKit1.service and org.freedesktop.PolicyKit.service in /usr/share/dbus-1/system-services/ ... those look like replacements for the one I thought I was missing. I looked at both of them and they both reference policykitd executed by root ... so they seem to be redundant. Do I need both of them?

Revision history for this message
Jesse Sweetland (sweetlandj) wrote :

I ran apt-get install libpolkit* policykit* and rebooted. I now have an /usr/share/dbus-1/gnome-org.freedesktop.PolicyKit.AuthenticationAgent.service, and several others that weren't there before.

I then ran polkit-auth --obtain org.freedesktop.packagekit.system-update and the the command now returns immediately with no output. Return value is 1. No authentication dialog appears (Gnome or KDE).

Here is the output of dbus-monitor --session as I ran the polkit-auth command:

signal sender=org.freedesktop.DBus -> dest=(null destination) serial=17 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.130"
   string ""
   string ":1.130"
method call sender=:1.130 -> dest=org.freedesktop.DBus serial=1 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=Hello
method call sender=:1.130 -> dest=org.freedesktop.PolicyKit.AuthenticationAgent serial=2 path=/; interface=org.freedesktop.PolicyKit.AuthenticationAgent; member=ObtainAuthorization
   string "org.freedesktop.packagekit.system-update"
   uint32 0
   uint32 1945
method return sender=:1.129 -> dest=:1.130 reply_serial=2
   boolean false
signal sender=org.freedesktop.DBus -> dest=(null destination) serial=18 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.130"
   string ":1.130"
   string ""

I tailed dbus-monitor --session when attempting to install something via kpackagekit and I see a lot of org.kde.KNotify stuff, but nothing to do with AuthenticationAgent.

Revision history for this message
Jesse Sweetland (sweetlandj) wrote :

Still having this issue on a fresh install of 10.04 final. I formatted all of the partitions (/boot, /, /home, /var, /tmp, and /usr) during the installation but kept the data in /home partition, so maybe there's some config file or something there that's causing it.

Interestingly, I did not have this issue when I did the exact same install on my laptop... both machines have the exact same configuration: same usernames with the same privileges, same partitions, LVM volume group, and volumes. Both machines had beta1 installed before, I formatted all partitions except /home during install.

Very vexing. I found some threads about using some kind of Policy Kit Authorization Manager in the KDE Settings screen in Karmic, but apparently it's not available in Lucid. The solution for some users was to remove/deauthorize and then re-authorize themselves to rebuild whatever access control list it needs. I have no clue where I would begin to look for such a file.

Revision history for this message
Jesse Sweetland (sweetlandj) wrote :

Problem fixed by wiping my user account and creating a new one.

Revision history for this message
Antonio Costantino (anto-costantino) wrote :

@ Jesse Sweetland: Does the "Date & Time" module of systemsettings work as well? Cause I created a new user and, while kpackagekit was actually working, the problem with systemsettings not being able to gain administrative privileges to set time and date didn't go away.

The strange thing is I'm experiencing this problem in a Jaunty-to-Karmic-to-Lucid machine and not in the one that went just from Karmic-to-Lucid.

I also agree that someone knowledgeable should fill a new bug report for Lucid linking it to these comments.

Revision history for this message
Jesse Sweetland (sweetlandj) wrote :

I never tried the date & time settings, and now (today, just now) it's no longer working. I experienced a crash in Dolphin (fourth time today) and went to file a bug report, then tried installing debug symbols, and now KPackageKit is no longer prompting for a password. Extremely aggravating, to the point where I'm about to go back to Gnome.

Revision history for this message
Jesse Sweetland (sweetlandj) wrote :

I opened bug #578833 to address the issue in Lucid.

Revision history for this message
Kent Tong (kent-tong) wrote :

I fixed this problem with:

   echo 16384 > /proc/sys/fs/inotify/max_user_watches

To make it permanent, create /etc/sysctl.d/60-user.conf with the content below:

   fs.inotify.max_user_watches=16384

Before applying the fix, I got the errors below:

kent@dragon:~$ kpackagekit &
[2] 3561
kent@dragon:~$ QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No space left on device
QFileSystemWatcher: failed to add paths: /home/kent/.config/ibus/bus/fc60bfcf9319c7743716b7214863c295-unix-0
enumFromString ( Group ) : converted "unknown" to "UnknownGroup" , enum value 34
removing transaction from pool : "/108_eccdeaed_data"
removing transaction from pool : "/109_ceadbdca_data"
removing transaction from pool : "/110_bcdbadea_data"
enumFromString ( State ) : converted "" to "UnknownState" , enum value 18
Attempting to obtain authorization for org.freedesktop.packagekit.system-update.
Authentication as an administrative user is required.
The following users qualify as administrative users: kent
Select user: Failed to obtain authorization for org.freedesktop.packagekit.system-update.
Authentification error : org.freedesktop.DBus.Error.NoReply : Message did not receive a reply (timeout by message bus)
removing transaction from pool : "/111_eebdaaba_data"

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.