Quote:
Originally Posted by suhas!
Design a form that will submit the username value using get or post method.
Get that username and set the password using system() function in php.
Make sure the script doesnt set root password inadvertently. Also parse the username input so that no other system command is executed.
This would be enough to deploy in secured private network.....
|
Hi Suhas
Firstly thanks for the reply. Please tell me how to use system function & currently i am issuing the command like this in action.php page
`sudo /changepasswd $username $password`
but it is saying you must have tty to set the password. The webserver user is apache & I have given apache user sudo access to run this script.
Secondly when I run this script manually from apache user sudo -u apache /changepasswd it is saying only root user can set the user password.