-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change expired password on OpenLDAP #96
Comments
Indeed, as PHP-LDAP cannot deal with password policy control, we can't id password is expired in OpenLDAP. I don't see a simple solution for the moment. Note that this works well with other languages. I implemented it with Perl in LemonLDAP::NG. |
Sucks for me then... One option would be to edit Maybe change the config file to only do that when a specific option is set, and make sure to check that the user isn't locked out because of too many failed logins... Not sure I'll have the time to implement this, but I hope I will. Would you be interested in a pull request? |
Reading the password value inside the directory to compare it to password is really a bad practice, you bypass brute force protection of password policy be doing it. You can indeed do it to fit your needs but I don't think I can merge this feature. But I understand your issue and know that we should find a solution. I need to check if PHP-LDAP API has not any way to get the expiration information. |
Indeed, a correct implementation for this - one not bypassing bruteforce protection - would have to:
I don't know much about other ldap implementations, but it seems that my "check that the account isn't locked" part is getting very openldap-specific. Since I have neither the knowledge to do a multi-ldap-source implementation nor the possibility to test it, I'll probably write it for myself :) Anyway, an ssh connexion with openldap-registered users knows the difference between invalid password (rejecting connexion) and expired password (requesting password change), so the openldap somehow provides enought informations to PAM to make the difference. I don't know if php-ldap supports this though... |
PAM-LDAP is compatible with password policy, this is why it works. PHP-LDAP is not. Your implementation proposition is good, except that checking pwdLockoutDuration is not necessary: if the account is still locked after the first bind, then the lock status is valid. |
Hi,
I'm trying to set up self-service-password so that users can change their own password on our openldap. This ldap is configured to make passwords expired after XX days and YY grace logins.
It works fine before password expiration, but I can't get it to work when user has an expired password and no more grace logins allowed, I still get the log message in httpd logs:
I tried with both possible
who_change_password
values, no success. I tried the$ad_options['change_expired_password'] = true;
no success - I guess it's only working for AD. The$ldap_binddn
I tried is theolcRootDN
on the openldap database, it has all read and modification rights, so it should be able to check userPassword value without binding to it.Did I miss something? Would you know how I can reset an expired password?
Many thanks for your support,
sfieux
The text was updated successfully, but these errors were encountered: