skip to Main Content

is it possible to do that? I’ve seen the commandline instructions but it seems that passwd is an interactive command and we can’t respond via PHP.
thanks

2

Answers


  1. The simplest solution is to use popen and chpasswd.

    $handle = popen('/usr/sbin/chpasswd', 'w');
    fputs($handle, "user:password");
    fclose($handle);
    
    Login or Signup to reply.
  2. Or try to emulating human with CURL.
    Login + Create Account. Simple example with one form http://curl.haxx.se/mail/curlphp-2004-04/0013.html

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search