I have created a new user and password. Now I need to change the username and password from the web page. I am able to change the username using usermod. But I am not able to change to password using the passwd command. Here the code:
shell_exec('(echo "'.$FTPpassword.'";sleep 1; echo "'.$FTPpassword.'") | passwd $FTPUserName');
Instead of $FTPUserName , if I send username test as :
shell_exec('(echo "'.$FTPpassword.'";sleep 1; echo "'.$FTPpassword.'") | passwd test');
it is updating password of the user "test". Anyone know how to change the password of a user using shell_exec?
Regards,
Sowmya