Bug 234

Summary: sudo without password fails silently, should give warning
Product: Sudo Reporter: Dick Gevers <dvgevers>
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: normal CC: dano-gratisoft
Priority: low    
Version: 1.6.8   
Hardware: PC   
OS: Linux   

Description Dick Gevers 2007-02-24 23:29:35 MST
This is not a bug perse, more a request for change. The only 'bug' seems to be that the behaviour described below is not documented.

Assumptions: 
User invokes a sudo command that is authorised by /etc/sudoers
User is supposed to enter a regular password: this report is not about users that use a blank password, nor about sudo commands that may be run without password for one reason or another.

Scenario: User enters a sudo command, but at the prompt forgets to enter his password and just presses 'enter'.

Actual result: the command fails silently, no error or warning is printed.
Expected (or 'desirable') result: the user is warned that the password is absent/incorrect, for example by printing "Sorry, try again", or any other.

Arguments: IMHO it is confusing that no error or warning is printed in case the password is accidentally not entered, particularly since the normal warning "Sorry, try again" does appear in case of any other wrong entry.
This result (no error printed) is IMHO not consistent with printing an error if the password is mistyped.

System used: Mandriva Cooker 2007.1

Comments: I understand from the discussion at: see below, that the current behaviour of sudo in case of pressing [ Enter ] without password is to be expected in accordance with the sudo code, but if you believe this should not be changed as requested here, I would like to propose that it be at least clearly documented in man sudo, so the user is aware of this.

Thanks beforehand.

Reference: This 'bug' was previously reported at Mandriva Linux as: http://qa.mandriva.com/show_bug.cgi?id=22147
Comment 1 Todd C. Miller 2007-04-24 14:00:43 MDT
*** Bug 243 has been marked as a duplicate of this bug. ***
Comment 2 Todd C. Miller 2008-11-07 14:33:06 MST
This behavior will be changed in sudo 1.7.0 (change is already in cvs).  Now, the only way to quit from the password prompt will be by hitting ^C