sudoers syntax question

mlh at zip.com.au mlh at zip.com.au
Tue Mar 4 08:39:58 EST 2003


On 03 Mar 2003 14:02:59 -0500
Chuck Mattern <camattern at acm.org> wrote:

> 1. These users will not know what id to run as, they cannot execute:
> 
> $ sudo -u informix /usr/local/bin/prog1
> 
> They need to execute:
> 
> $ sudo /usr/local/bin/prog1
> 
> and sudo needs to decide what id to run as based on the sudoers file.

Yeah that's something I'd like too.  But sudo doesn't do it.
Ask Todd to add it to the wishlist :-)

As a halfway point to this goal, it would be nice to have 
"sudo -l" spit out the possibilities in a syntactically valid
way, so that you could just copy and paste.

i.e. instead of "sudo -l" printing
  (informix) /usr/local/bin/prog1
it'd be nice to get:
  sudo -u informix /usr/local/bin/prog1

This could then be leveraged into a nice menu based system.

Regards,
Matt


More information about the sudo-users mailing list