executing LInux commands from web
am trying to develop something just for fun by using perl & cgi scripting with linux.
What I am trying to do is, creating user from the web.
This is my html script
then myscript2.cgi looks like tis
But my question is how to receive the parameter from the web and use the parameter with useradd comand and create the user.
HOpe u guys can give me ideas
Re: executing LInux commands from web
Your perl script is executed by the Web Server's user (usually apache or nobody), which have few system privileges. To run these commands you need to run the script as a privileged user. You can use suexec(http://httpd.apache.org/docs/1.3/suexec.html) or use the sudo command.
To secure your script you must implement some authentication to access the script, additionally you may also use SSL to access the script.
|All times are GMT +5.5. The time now is 21:12.|