fakessh wrote:
function password_save($currpass, $newpass) {
if ( !extension_loaded('pam') && !extension_loaded('pam_auth') )
if ( !dl('pam.so') && !dl('pam_auth.so') )
echo( "PHP PAM module cannot be loaded" );
if ( pam_auth ($_SESSION['username'],$currpass) )
return;
if (pam_chpass($_SESSION['username'], $currpass, $newpass))
return PASSWORD_SUCCESS;
I'll create 'pam' driver, but I have one question about this code. Is pam_auth() required before pam_chpass()? Did you tried without pam_auth()?