Forums de discussion

LDAP user import

Sebastian Ulrich, modifié il y a 6 années.

LDAP user import

New Member Publications: 10 Date d'inscription: 10/03/16 Publications récentes
Hello,

I am working on Liferay 6.2, and I am looking into the LDAP user import functionality.
I have two questions :
- first, I would like to understand how this import is working. The reason I am asking this is because when we activated it, it first imported around 9000 users when the AD was containing around 30 000. The import later (on a server restart) managed to import the other users, but I am therefore worried that this might not work as expected if we put this in Production.
- besides, I saw on later imports that for each user that was already present, the following error occurred : com.liferay.portal.DuplicateUserEmailAddressException :
at com.liferay.portal.service.impl.UserLocalServiceImpl.validate(UserLocalServiceImpl.java:6011)
at com.liferay.portal.service.impl.UserLocalServiceImpl.updateUser(UserLocalServiceImpl.java:4960)
at sun.reflect.GeneratedMethodAccessor837.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
...

This will be a problem in Production as well as the size of the log files is exploding because of this. Shouldn't it be expected that users can already have been imported ?

Thanks forward
Regards,
Sébastian ULRICH
thumbnail
Manish Jha, modifié il y a 6 années.

RE: LDAP user import

Junior Member Publications: 50 Date d'inscription: 07/02/13 Publications récentes
As user log in to the Liferay, if user is not found in the liferay , it imports the user from LDAP.
So, this functionality will not fail in Production.

You can import all the user from Ldap at once in the Liferay from System configuration.

You are getting duplication email because Liferay is using email as unique parameter to identify user. User use email to login to Liferay.
Instead , if you want to user screen name as login credential, then you need to change the Portal-ext.properties file. Restart the server and import user from Ldap. This error will disappear.
Sebastian Ulrich, modifié il y a 6 années.

RE: LDAP user import

New Member Publications: 10 Date d'inscription: 10/03/16 Publications récentes
Hello,

Thanks for your answers.

We already have users imported in Production on connection. However, we would like to do bulk imports instead, e.g. so that we can assign roles to users that haven't connected yet.

You are getting duplication email because Liferay is using email as unique parameter to identify user. User use email to login to Liferay.

I understand this, so you confirm that if I set screenName as unique parameter, then i won't get a 'screen name duplicate' error ?

Besides, that still doesn't explain why the first time we launched the import, only 9000 out of 30000 users have been imported. Does the import depend on a specific LDAP structure ?

Thanks
Regards
Sébastian ULRICH