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.
Edit:
PHP code:
echo pam_chpass($username, $password, $new_pass, &$error) ? 'good' : $error;
PHP (echo) output:
Permission denied (in pam_authenticate)
From /var/log/auth (these are actually from before, the log doesn’t seem to be working ATM for some reason yet to be determined):
Jun 11 15:30:20 veda php: pam_unix(php:chauthtok): conversation failed
Jun 11 15:30:20 veda php: pam_unix(php:chauthtok): password - (old) token not obtained
Jun 11 15:30:20 veda php: pam_winbind(php:chauthtok): valid_user: wbcGetpwnam gave WBC_ERR_DOMAIN_NOT_FOUND
Other:
Sorry for the lack of details before, I was really tired when I posted the question but thats still a crappy excuse.
After hours of research online, I wasn’t able to find a super good option so I’m implemented this hack. It uses this article for changing passwords using PHP.
I’m also using the PECL:PAM package to add a little verification.
This page is on a secure HTTPS folder (automatic redirect via .htaccess)
I also have this question/answer posted in https://serverfault.com/questions/150306/how-to-let-users-change-linux-password-from-web-browser/152409#152409