Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Using CentOS Release 6.4 x86 when I go to System > Administration > Add/Remove Software and try to add software or refresh the package list, I immediately get the following error:

Authorization Failed

Authorization Failed

You have failed to provide correct authentication. Please check any passwords or account settings.

Failed to obtain authentication

However the reason I failed to provide authentication is because I was never asked for a password at all. I'm running as a normal user who is a member of the wheel group and can run commands via sudo. I also can su to root. I am able to install software via yum.

How can I fix the issue where Add/Remove Software never asks for a password?


UPDATE: The issue appears to be with PolicyKit. Specifically, I have no authentication agent running and trying to start it results in the error

Unable to determine the session we are in: Remote Exception invoking org.freedesktop.ConsoleKit.Manager.GetSessionForUnixProcess()

Some terminal output:

[jnet@dogYears Desktop]$ pkexec echo "test"
Error executing command as another user: No authentication agent was found.

[jnet@dogYears Desktop]$ ps awwwx|grep polkit        
 2059 ?        S      0:00 /usr/libexec/polkit-1/polkitd
28688 pts/3    S+     0:00 grep polkit

[jnet@dogYears Desktop]$ /usr/libexec/polkit-gnome-authentication-agent-1
(polkit-gnome-authentication-agent-1:28725): polkit-gnome-1-WARNING **: Unable to determine the session we are in: Remote Exception invoking org.freedesktop.ConsoleKit.Manager.GetSessionForUnixProcess() on /org/freedesktop/ConsoleKit/Manager at name org.freedesktop.ConsoleKit: org.freedesktop.ConsoleKit.Manager.GeneralError: Unable to lookup session information for process '28725' org.freedesktop.ConsoleKit.Manager.GeneralError Unable%20to%20lookup%20session%20information%20for%20process%20%2728725%27
share|improve this question
1  
I came here with the same problem. I am using VNC to connect into the host, no direct access (this might cause the problem)? Anyway, since I did not find a way to make the Gnome->Software Update work, I used yum. I just saw you also suggest this. :) –  Andreas Reiff Oct 27 at 20:26

1 Answer 1

I guess you are using Gnome? Anyway, use the tools provided by whichever GUI you are using and make sure that the menu item that you use to launch your package manager points to (I believe the package manager in CentOS is called pirut but change accordingly):

gksudo pirut

and not just pirut. That should make it ask you for a password next time.

share|improve this answer
    
I think you're supposed to use gksudo instead, although I can't remember why. I'm also fairly sure you should use pkexec, if possible. that doesn't work with everything, though. –  strugee Nov 15 '13 at 6:38
    
@strugee never heard of pkexec is it a Red Hat thing? As for gksudo on my Debian it's just a link to gksu. –  terdon Nov 15 '13 at 6:44
    
when invoked as gksudo it behaves differently, like e.g. bzip and bunzip. pkexec is a frontend to PolicyKit; for reference, Ubuntu had just dropped gksu in favor of pkexec when I abandoned ship for Arch (just under a year ago). –  strugee Nov 15 '13 at 6:49
    
Hm, I don't have gksu installed, so that's likely what's failing. I do have pkexec installed... when I run it, I get Error executing command as another user: No authentication agent was found. –  Josh Nov 15 '13 at 13:06
1  
@strugee as far as I know and as far as I can tell from the man page, calling gksudo uses sudo as the backend while gksu will use su. So, yes, you're right and gksudo is probably better. Thanks. –  terdon Nov 15 '13 at 14:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.