You are not logged in.

#1 2014-03-19 19:57:44

o_caino
Member
Registered: 2013-06-06
Posts: 166

[SOLVED] Last sudo update broke paccache

Hi,
last night when I -Syu'ed my system there was an update for sudo. After updating I ran paccache -vr to remove old cached packages, but it doesn't work anymore because of sudo not recognizing my password (?). Tried rebooting so the old sudo binary is removed from mem cache, but no luck.

This is the sample output (Ctrl + C after 3rd try)

$  paccache -vr
==> Privilege escalation required
[sudo] password for root: 
[sudo] password for root: 
[sudo] password for root: 
==> ERROR: Unable to escalate privileges using sudo

==> finished: 2 packages removed (diskspace saved: 300.72 KiB)

Thanks in advance.

Last edited by o_caino (2014-03-19 21:09:06)

Offline

#2 2014-03-19 20:02:51

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Last sudo update broke paccache

What version of sudo has the problem?

See https://bbs.archlinux.org/viewtopic.php?id=178544 for some hints.

Offline

#3 2014-03-19 20:06:57

o_caino
Member
Registered: 2013-06-06
Posts: 166

Re: [SOLVED] Last sudo update broke paccache

$ sudo -V
Sudo version 1.8.10p2
Sudoers policy plugin version 1.8.10p2
Sudoers file grammar version 43
Sudoers I/O plugin version 1.8.10p2

Using sudo with other commands (e.g. sudo pacman -Syu) works as usual.

Offline

#4 2014-03-19 20:17:07

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Last sudo update broke paccache

Works here:

$ paccache -vr -k1
==> Privilege escalation required
[sudo] password for karol: 
removed ‘intel-dri-8.0.4-3-i686.pkg.tar.xz’

==> finished: 1 packages removed (diskspace saved: 366.3 KiB)

Last edited by karol (2014-03-19 20:21:17)

Offline

#5 2014-03-19 20:34:07

o_caino
Member
Registered: 2013-06-06
Posts: 166

Re: [SOLVED] Last sudo update broke paccache

/etc/sudoers doesn't seem to be the problem. Also, it's unmodified since I installed arch.

I'll post it just in case

## sudoers file.
##
## This file MUST be edited with the 'visudo' command as root.
## Failure to use 'visudo' may result in syntax or file permission errors
## that prevent sudo from running.
##
## See the sudoers man page for the details on how to write a sudoers file.
##

##
## Host alias specification
##
## Groups of machines. These may include host names (optionally with wildcards),
## IP addresses, network numbers or netgroups.
# Host_Alias	WEBSERVERS = www1, www2, www3

##
## User alias specification
##
## Groups of users.  These may consist of user names, uids, Unix groups,
## or netgroups.
# User_Alias	ADMINS = millert, dowdy, mikef

##
## Cmnd alias specification
##
## Groups of commands.  Often used to group related commands together.
# Cmnd_Alias	PROCESSES = /usr/bin/nice, /bin/kill, /usr/bin/renice, \
# 			    /usr/bin/pkill, /usr/bin/top

##
## Defaults specification
##
## You may wish to keep some of the following environment variables
## when running commands via sudo.
##
## Locale settings
# Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET"
##
## Run X applications through sudo; HOME is used to find the
## .Xauthority file.  Note that other programs use HOME to find   
## configuration files and this may lead to privilege escalation!
# Defaults env_keep += "HOME"
##
## X11 resource path settings
# Defaults env_keep += "XAPPLRESDIR XFILESEARCHPATH XUSERFILESEARCHPATH"
##
## Desktop path settings
# Defaults env_keep += "QTDIR KDEDIR"
##
## Allow sudo-run commands to inherit the callers' ConsoleKit session
# Defaults env_keep += "XDG_SESSION_COOKIE"
##
## Uncomment to enable special input methods.  Care should be taken as
## this may allow users to subvert the command being run via sudo.
# Defaults env_keep += "XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER"
##
## Uncomment to enable logging of a command's output, except for
## sudoreplay and reboot.  Use sudoreplay to play back logged sessions.
# Defaults log_output
# Defaults!/usr/bin/sudoreplay !log_output
# Defaults!/usr/local/bin/sudoreplay !log_output
# Defaults!/sbin/reboot !log_output

##
## Runas alias specification
##

##
## User privilege specification
##
root ALL=(ALL) ALL

## Uncomment to allow members of group wheel to execute any command
# %wheel ALL=(ALL) ALL

## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL

## Uncomment to allow members of group sudo to execute any command
# %sudo	ALL=(ALL) ALL

## Uncomment to allow any user to run sudo if they know the password
## of the user they are running the command as (root by default).
Defaults targetpw  # Ask for the password of the target user
ALL ALL=(ALL) ALL  # WARNING: only use this together with 'Defaults targetpw'

## Read drop-in files from /etc/sudoers.d
## (the '#' here does not indicate a comment)
#includedir /etc/sudoers.d

Offline

#6 2014-03-19 20:57:50

o_caino
Member
Registered: 2013-06-06
Posts: 166

Re: [SOLVED] Last sudo update broke paccache

Same on my other computer... Both i686.

Edit: I just found something weird. Even though sudo is asking for root's password, entering my user's password works!

$ paccache -vr
==> Privilege escalation required
[sudo] password for root:  [enter my user password]
s’ha eliminat «sudo-1.8.8-1-i686.pkg.tar.xz»
s’ha eliminat «dhcpcd-6.2.1-1-i686.pkg.tar.xz»

==> finished: 2 packages removed (diskspace saved: 769.25 KiB)

Last edited by o_caino (2014-03-19 21:00:01)

Offline

#7 2014-03-19 21:00:46

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Last sudo update broke paccache

I'm using 32-bit too.
Are you running paccache as root? Try running it as a user.


Edit: A-ha, I knew there was something wrong with it :-)

Last edited by karol (2014-03-19 21:01:28)

Offline

#8 2014-03-19 21:03:37

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: [SOLVED] Last sudo update broke paccache

There is a relevant change in sudo 1.8.10:

When listing a user's privileges (sudo -l), the sudoers plugin will now prompt for the user's password even if the targetpw, rootpw or runaspw options are set.

The prompt is wrong though, since it asks for the root password even though it expects the user password.

I will report the above issue on sudo's bug tracker, but paccache will need to be changed not to call "sudo -l" before actually running "sudo <actual command>"; otherwise it will ask for both the user password and the root password when targetpw is used.

Offline

#9 2014-03-19 21:08:35

o_caino
Member
Registered: 2013-06-06
Posts: 166

Re: [SOLVED] Last sudo update broke paccache

In that case I'll mark this thread as solved.

Thanks!

Offline

#10 2014-03-20 01:51:54

Narthorn
Member
Registered: 2013-03-05
Posts: 4

Re: [SOLVED] Last sudo update broke paccache

The same bug seems to be affecting yaourt.

Edit: reported it on its bug tracker as well !

Last edited by Narthorn (2014-03-20 01:53:28)

Offline

#11 2014-03-29 23:11:44

wrm
Member
From: Europe
Registered: 2005-06-09
Posts: 19

Re: [SOLVED] Last sudo update broke paccache

adding SUDONOVERIF=1 (note: this is not a typo and it should not have "Y" at the end) to /etc/yaourtrc finally solved my problem regarding this.


knowledge is p0wer..

Offline

Board footer

Powered by FluxBB