PHP/PAM to change user password?

前端 未结 5 1230
被撕碎了的回忆
被撕碎了的回忆 2021-02-10 02:16

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 03:00

    You could use RSBAC passwords.

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

    So much easier.

提交回复
热议问题