A
Archie邱
#!/usr/bin/suidperl -wT
use CGI;
$ENV{'PATH'} = '/bin:/usr/bin';
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
$path = $ENV{'PATH'};
$q = new CGI;
print $q->header(-charset=>'big5');
print $q->start_html(-title=>'setup new user');
system("/usr/sbin/useradd -c 'tester user' 'tester' ");
print $q->h2("test ok !!");
==> I want to useradd by suidperl but it not work why ?
use CGI;
$ENV{'PATH'} = '/bin:/usr/bin';
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
$path = $ENV{'PATH'};
$q = new CGI;
print $q->header(-charset=>'big5');
print $q->start_html(-title=>'setup new user');
system("/usr/sbin/useradd -c 'tester user' 'tester' ");
print $q->h2("test ok !!");
==> I want to useradd by suidperl but it not work why ?