What I am trying to do is, creating user from the web.
This is my html script
HTML Code:
<HTML> <BODY> <FORM METHOD="POST" ACTION="/cgi-bin/myscript2.cgi"> <PRE> First Name <INPUT TYPE="text" NAME="name" MAXLENGTH=15 SIZE=15> <INPUT TYPE="submit" VALUE="Send Mail!"> <INPUT TYPE="reset" value=" Clear-Form"> </PRE> </FORM> </BODY> </HTML>
then myscript2.cgi looks like tis
Code:
#!/usr/bin/perl
use strict;
use CGI;
my $q = new CGI;
my $name = $q->param( "name" );
system("/etc/sbin/useradd $name");
print $q->header( "text/html" ),
$q->start_html( "Welcome" ),
$q->p( "Hi $name!" ),
$q->end_html;
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

