Bug 561 - su-like, if not in the sudoers file
su-like, if not in the sudoers file
Status: RESOLVED WONTFIX
Product: Sudo
Classification: Unclassified
Component: Sudo
1.8.4
All All
: low enhancement
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-22 07:28 MDT by lightbit8
Modified: 2013-09-30 09:38 MDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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'