---PHP---
exec ('myscript.pl username passwd')
----------
---myscript.pl---
$username = $ARGV[0];
$pw = $ARGV[1];
system ('pw useradd $username -n $username -d /home -s /nologin -m');
system ('echo $pw | pw usermod -n $username -h 0 ');
exit(0);
----
In my case apache must have root privileges to execute pw command, there is my problem, giving to apache rights to execute pw is a security hole. I thought is it possible to configure apache so, that it can execute pw only in one directory (e.g /usr/local/myweb)? Or does anyone has done such a things before and can help me