Issue
- After the user changes the password in Microsoft Active Directory (AD), the user can still log into Liferay using the old password. If enabling "Required" option, the issue can be resolved. But users created manually in Liferay (not imported from AD) can not sign into Liferay anymore.
Environment
- Liferay DXP 7.3
Resolution
- Enable "Autogenerate User Password on Import" option
Additional Information
Here is the explanation for the three options:
"Enable User Password on Import"
"Autogenerate User Password on Import"
"Default User Password"
I. "Enable User Password on Import" option is enabled
Even the LDAP scheduled import is enabled, the user's password will not be imported to Liferay database on a regularly configured interval (10 minutes by default). The user’s password will only be imported to Liferay database during user authentication.
1. New user in Liferay
An auto-generated password is stored in the database when Liferay imports the user from LDAP. The real LDAP password is synced in the database when the user signs into Liferay for the first time.
2. Existing user in Liferay
If the user changes the LDAP password, the new password will be stored in the Liferay database only after the user signs into Liferay with the new password. Before that, the user can still sign into Liferay with the old password.
II. "Enable User Password on Import" option is not enabled
Liferay will not import user’s password to Liferay database no matter during the scheduled import or the user authentication. Liferay will check whether "Autogenerate User Password on Import" is enabled.
1. "Autogenerate User Password on Import" is enabled
a. New user in Liferay
An auto-generated password is stored in the database when Liferay imports the user from LDAP.
b. Existing user in Liferay
The auto-generated password will be updated at configured import interval.
2. "Autogenerate User Password on Import" is not enabled
Because the Password field cannot have a NULL value, the value set in "Default User Password" is used and stored in the database.