Bug 545

Summary: option -v not working
Product: Sudo Reporter: Dan <dandm3>
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: normal    
Priority: low    
Version: 1.8.4   
Hardware: PC   
OS: Linux   
Attachments: Patch to fix "sudo -v" in sudo 1.8.4

Description Dan 2012-03-12 11:46:48 MDT
The -v option does not seem to work in 1.8.4. I type 'sudo -v' and it returns to the prompt. I then use sudo with some command say, 'sudo ls' and I am prompted for my password. But the 'sudo -v' command that I ran previously should have prompted for the password if my credentials had expired.

My systems are Arch Linux and sudo is version 1.8.4p2.
Comment 1 Todd C. Miller 2012-03-12 11:52:08 MDT
Were both sudo commands run from the same terminal?  The tty_tickets option is enabled by default on newer sudo versions so "sudo -v" is per-terminal.  You can change this by adding a line in sudoers like:

Defaults !tty_tickets
Comment 2 Dan 2012-03-12 12:14:16 MDT
Yes, the commands were run from the same terminal, one right after the other.
Comment 3 Todd C. Miller 2012-03-12 19:36:28 MDT
Created attachment 335 [details]
Patch to fix "sudo -v" in sudo 1.8.4

The attached patch fixes the problem.
Comment 4 Todd C. Miller 2012-03-12 20:44:41 MDT
Fixed in sudo 1.8.4p4, available now.