Hi
I have this sample code below :
<?php
$username = "edselle";
$password = "mypasswd";
system("useradd $username");
system("echo '$password' | passwd --stdin $username");
?>
I've got it to work if i use this as a php shell script and running as root, but when i run it on the web browser it doesn't output anything and the user that i'm expecting to be created was not successfully created. Do i miss something here. This could be an access rights problem right? What do i need to add to this piece of code so that i would be able to run it successfully on the web browser?