Bugzilla – Bug 639
"sudo -l" asks for wrong password when using targetpw, rootpw or runaspw
Last modified: 2014-05-07 13:19:22 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: "
Created attachment 400 [details] Fix %p expansion for sudo -l with targetpw etc The attached patch fixes it for me.
(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!
Fixed in sudo 1.8.10p3