This article shows basic configuration of how to setup Liferay to import users from an LDAP server through the graphical user interface.
Please note that the Control Panel interface changes from Liferay Portal version to version. The exact steps for accessing the Control Panel and portal settings may differ depending on Liferay Portal version.
To enter the LDAP settings, go to Control Panel > Settings and under Configuration click Authentication > LDAP.
To enable LDAP, check Enable. By checking this, it will enable Liferay to use LDAP authentication. By default Liferay imports users in a 10 minutes interval. Additionally when an LDAP user logs into Liferay, that user's information will be imported right at that moment. If the user does not need to constantly synchronize the entire user pool, then the import interval's value should be raised to a higher value. This can be achieved by modifying the property portal-ext.properties:
Under Import/Export, check Import Enabled. When checked, the user will import all the users. Additionally you can set if you want to import users at portal startup.
Import on Startup Enabled
Leave Export Enabled unchecked.
Click Add to add an LDAP Server.
Enter the name of the LDAP Server at the top.
There is a radio button list of default choices; clicking these will help fill out the default values.
Here is an example:
Click Test LDAP Connection to validate.
For this example, in the Users field, leave these as the default, except for the Authentication Search Filter field. Change the (sAMAccountName=@user_id@) to (sAMAccountName=@screen_name@), if authentication will be by screen name. If the user wishes to change how users login (Ex. Login with screen name), then change the settings in theAuthentication Search Filter field.
Click Test LDAP Users. This is an example result of the Test Users button.
In the Group field, users can alter how groups are imported. The example left these as the default.
Fill out the rest of the form accordingly then click Save. Please note that only users with Screen Name, Password, Email Address, First Name, and Last Name will be imported. These are necessary attributes Liferay needs to create a user internally. Last Name might change from version to version.
If the option Import on Startup Enabled has been checked, then users can restart their application server to immediately trigger the bulk import process. Log back in, go the Control Panel > Users and the imported Users will appear.