return PAM_IGNORE;
}
else {
- /* Change the user's password IFF it's null. */
- if ((pdb_get_lanman_passwd(sampass) == NULL) && (pdb_get_acct_ctrl(sampass) & ACB_PWNOTREQ))
+ /* mimick 'update encrypted' as long as the 'no pw req' flag is not set */
+ if ( pdb_get_acct_ctrl(sampass) & ~ACB_PWNOTREQ )
{
- retval = local_password_change( name, 0, pass, err_str, sizeof(err_str),
+ retval = local_password_change( name, LOCAL_SET_PASSWORD, pass, err_str, sizeof(err_str),
msg_str, sizeof(msg_str) );
if (!retval && *err_str)
{