Bug 639 - "sudo -l" asks for wrong password when using targetpw, rootpw or runaspw
"sudo -l" asks for wrong password when using targetpw, rootpw or runaspw
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudoers
1.8.10
PC Linux
: low normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-19 15:37 MDT by Evangelos Foutras
Modified: 2014-05-07 13:19 MDT (History)
0 users

See Also:


Attachments
Fix %p expansion for sudo -l with targetpw etc (1.98 KB, patch)
2014-03-19 16:53 MDT, Todd C. Miller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Evangelos Foutras 2014-03-19 15:37:17 MDT
Starting with sudo 1.8.10, the "sudo -l" command is supposed to ask for the user password even when targetpw, rootpw or runaspw is specified in /etc/sudoers.

The password prompt, however, incorrectly asks for the root password when it really wants (and only accepts) the user password.

For example, with rootpw set:

Expected prompt:

$ sudo -l
[sudo] password for myuser:

Actual prompt:

$ sudo -l
[sudo] password for root:

I'm building sudo with: --with-passprompt="[sudo] password for %p: "
Comment 1 Todd C. Miller 2014-03-19 16:53:14 MDT
Created attachment 400 [details]
Fix %p expansion for sudo -l with targetpw etc

The attached patch fixes it for me.
Comment 2 Evangelos Foutras 2014-03-19 17:24:35 MDT
(In reply to Todd C Miller from comment #1)
> Created attachment 400 [details]
> Fix %p expansion for sudo -l with targetpw etc
> 
> The attached patch fixes it for me.

Works for me as well. Thanks!
Comment 3 Todd C. Miller 2014-05-07 13:19:22 MDT
Fixed in sudo 1.8.10p3