[sudo-users] Sudo and parameters to a script

megadethpaw megadethpaw megadethpaw at hotmail.co.uk
Tue May 5 11:28:33 EDT 2009


I've installed sudo 1.7.1 on my Solaris box ( have used earlier
versions before as well ).

One thing I've often wanted to do is to restrict useage to a script
that can have a parameter of 2 values, for instance I have a script
called "timeofday" this can accept "morning" or "afternoon" as a

I know I can add a line such as:-

Cmnd_Alias Scpt = timeofday morning, timeofday afternoon

Is there a better way that it can be done, something like:-

Cmnd_Alias Scpt = timeofday morning||afternoon

The "||" mean a logical or, so it basically says you can must supply
"morning" or "afternoon" to the script?


View your Twitter and Flickr updates from one place – Learn more!

More information about the sudo-users mailing list