I would like to be able to change a user password from a webpage. However the problem that I'm having is that the command passwd is interactive. How can I pass data to and form the command using system() or exec () exec("passwd $username $password") does not work
First of all, you probably shouldn't be changing your password through the web. Anyway, if you insist on doing it this way, you should take a look at writing a "here-document" script or an "expect" script that in turn call passwd.
do you have an example of such a script
Hi Lucien, Did u find the solution? I'm facing the same problem with u now. Plz help.
hi,
As it happens I'm facing the exact same problem, did any of you figure a way out? If you did would you be so kind as to share it with me?
Thanks