in reply to Re: Using exec() for executing shell scripts in CGI
in thread Using exec() for executing shell scripts in CGI

Thanks for the responses

As mentioned in original post, I preset the executables I need to run using the following approach:-

I have a hash which has the list of commands that can only be used. Something like..

my %commands = ( opt1 => exe1, opt2 => exe2, opt3 => exe3, );

In the CGI script, I have a variable , $runmode, which can take a value of 'opt1' or 'opt2' or 'opt3'. I retrieve the executable by $commands{ 'opt1' } and pass it on to the shell script.

I don't do any admin activities such as adding new user, deleting or modifying existing user accounts, etc.. using CGI scripts.