Bugzilla – Bug 561
su-like, if not in the sudoers file
Last modified: 2013-09-30 09:38:19 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.
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'