Bug 561

Summary: su-like, if not in the sudoers file
Product: Sudo Reporter: lightbit8
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED WONTFIX    
Severity: enhancement    
Priority: low    
Version: 1.8.4   
Hardware: All   
OS: All   

Description lightbit8 2012-06-22 07:28:08 MDT
Ask for target's (-u) password, if user not in the sudoers file.
I think this would be really good, because it would allow to fully replace su.
Comment 1 Todd C. Miller 2013-09-30 09:38:19 MDT
I think it would be a mistake for sudo to allow arbitrary users to run it by default.  If you want su-like functionality, you just need to use something like the folowing, a commented out version of which is already in the default sudoers file.

Defaults targetpw  # Ask for the password of the target user
ALL ALL=(ALL) ALL  # WARNING: only use this together with 'Defaults targetpw'