Vincent,
The passwd command will prompt you twice for entering the new password.
<?
EXEC(" echo 'new_password ' | passwd --stdin user_name")
?>
i tried the above piece of code and i get bad conversation error.
Please help!
Thanks
Dan wrote:
Hi Vincent,
I tried your code but it is not working. I think I need to login as 'su' first before exe this php script but how do u do that? Please help.
Vincent wrote:
First, chaning passwords from web-enabled scripts is VERY dangerous!
But you could do it like this:
<?
EXEC(" echo 'new_password ' | passwd --stdin user_name")
?>