[sudo-users] Custom "sudo password": is that feasible?

David Thiel lx at redundancy.redundancy.org
Thu May 4 12:59:59 EDT 2006


On Thu, May 04, 2006 at 12:00:12PM +0100, Loris Serena wrote:
> What I am trying to do is the following:
> As user goofy, I'd like to "sudo su - root" and be asked to provide a "sudo
> custom password" (i.e. nor the "goofy" neither the "root" password).
> Is this doable in the first place?
> And if yes, how do I do it?

You can do this if you create a dummy account with the password that you
want to use - make sure that the dummy account has no valid shell. Then,
use the following sudoers rules:

Defaults:goofy runas_default=notgoofy
Defaults:goofy runaspw

goofy ALL=(root) ALL

This will make it so that goofy is prompted for the password of notgoofy
when executing commands.




More information about the sudo-users mailing list