Hi!, I've got a problem. I ve got a server A and a server B. On server A there is a Apache. I've got a Perl or Bash script used to add an user account (username and other information about new account are the parameters of the script). How to write a php page (running on Apache on server A) that could execute my Bash/Perl script on server B. thanks for your help, sorry for my english
Hi, $host=escapeshellarg($args); $cmd=escapeshellcmd("adduser.pl ".$args); $r=shell_exec($cmd); Regards Adrian
Will it works in MS Windows ? I though this command runs command only on a server where web server stands? I think my question is not precisly. I want to open this php page on another computer - let's call it C - there would be a field to enter a username etc. for new account. Then I'll click OK and new account will be create on server B.
Your adduser.pl or adduser.sh (perl / bash) need to do a remote ssh (with key auth) and add your user. syntax is something like : ssh host command but you need to generate a pair of keys for ssh to work withou "keyboard" auth ! Regards
Thanks, Ive though about it but Ive got one script that create account on linux machine and one for windows machine. Solution with ssh for linux is no problem but what about windows ?