How can I use "sudo" to allow to "su"

Todd C. Miller Todd.Miller at
Wed Apr 3 14:46:37 EST 2002

In message <7115D5B736ECD21180130008C75D6C4F085AEAE9 at>
	so spake "Villegas, Beatriz D." (Beatriz.Villegas):

> I have a script that does: su - user -c "command"
> How can configure sudo to give "user_a" the capability of doing the "su"
> without having to enter password?

By default, sudo prompts for the invoking user's password.
You can turn that off globally with a sudoers line such as:
    Defaults !authenticate

Or you can use the NOPASSWD tag on individual commands.  For instance:
    millert	ALL=NOPASSWD:/bin/ls

Given your situation you probably want to do the former.

 - todd

More information about the sudo-users mailing list