10

Running Scripts With Parameters with sudo

view full story
linux-howto

http://www.unix.com – Hello everyone, I'm new to the community so please bear with me if my terminology is not correct... I'm trying to configure /etc/sudoers so a specific user can run a script as root. My problem is I want to lock down what parameters the user can run the script against. The script in question accepts another file as its parameter e.g. /scripts/myscript.ksh /root/config-files/fileA.cfg I want userA to be able to run the above script as root but only run it using a specific file/parameter. e.g. $ sudo '/scripts/myscript.ksh <parameter_1>' Is this possible? Everything i've tried (HowTos)