How can I fix the issue where Add/Remove Software never asks for my password?
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.
Related videos on Youtube
Hugo
Updated on September 18, 2022Comments
-
Hugo almost 2 years
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
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 viasudo
. I also cansu
to root. I am able to install software viayum
.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
-
Admin over 9 yearsI 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. :)
-
-
user2914606 over 10 yearsI think you're supposed to use
gksudo
instead, although I can't remember why. I'm also fairly sure you should usepkexec
, if possible. that doesn't work with everything, though. -
terdon over 10 years@strugee never heard of
pkexec
is it a Red Hat thing? As forgksudo
on my Debian it's just a link togksu
. -
user2914606 over 10 yearswhen invoked as
gksudo
it behaves differently, like e.g.bzip
andbunzip
.pkexec
is a frontend to PolicyKit; for reference, Ubuntu had just droppedgksu
in favor ofpkexec
when I abandoned ship for Arch (just under a year ago). -
Hugo over 10 yearsHm, I don't have
gksu
installed, so that's likely what's failing. I do havepkexec
installed... when I run it, I getError executing command as another user: No authentication agent was found.
-
terdon over 10 years@Josh strange, it should have come with Gnome. Do you have
gksudo
? Sounds likepkexec
needs some configuring but I've never used it so I can't help. I assumesudo pirut
works as expected? -
terdon over 10 years@strugee as far as I know and as far as I can tell from the man page, calling
gksudo
usessudo
as the backend whilegksu
will usesu
. So, yes, you're right andgksudo
is probably better. Thanks. -
terdon over 10 years@Josh some pointers here.