PHP/PAM to change user password?

前端 未结 5 1034
广开言路
广开言路 2021-02-10 02:38

Are there any working packages to change a linux user passwords using PHP?

I\'ve tried using PECL:PAM but theres an error when it tries to change the password.

E

5条回答
  •  囚心锁ツ
    2021-02-10 02:53

    You could use RSBAC passwords.

    $ret = system("echo \"newpass newpass\" | rsbac_password -n");
    
    if ($ret)
        echo "fail.";
    else
        echo "done!";
    

    So much easier.

提交回复
热议问题