2
votes

I want to configure LDAP with liferay.

When i click on "Test LDAP Connection", a message appears that "Liferay has successfully connected to the LDAP server."

But when i click "Test LDAP Users", i get below exception.

20:36:38,193 ERROR [http-bio-8080-exec-7][IncludeTag:253] Current URL /group/control_panel/manage?p_p_id=130&p_p_lifecycle=0&p_p_state=exclusive&p_p_mode=view&doAsGroupId=10180&refererPlid=10183&_130_struts_action=%2Fportal_settings%2Ftest_ldap_users generates exception: javax.servlet.ServletException: javax.naming.directory.InvalidSearchFilterException: Empty filter; remaining name 'ou=Users,ou=Groups'

20:36:38,199 ERROR [http-bio-8080-exec-7][IncludeTag:154] javax.naming.directory.InvalidSearchFilterException: Empty filter; remaining name 'ou=Users,ou=Groups' at com.sun.jndi.ldap.Filter.encodeFilterString(Filter.java:38) at com.sun.jndi.ldap.LdapClient.search(LdapClient.java:520) at com.sun.jndi.ldap.LdapCtx.doSearch(LdapCtx.java:1962) at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1824) at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1749) at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:368) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:338) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:321) at javax.naming.directory.InitialDirContext.search(InitialDirContext.java:248) at com.liferay.portal.security.ldap.PortalLDAPUtil.searchLDAP(PortalLDAPUtil.java:760) at com.liferay.portal.security.ldap.PortalLDAPUtil.getUsers(PortalLDAPUtil.java:557) at org.apache.jsp.html.portlet.portal_005fsettings.test_005fldap_005fusers_jsp._jspService(test_005fldap_005fusers_jsp.java:563) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

I've set below properties in portal-ext file. ldap.base.provider.url.0=ldap://localhost:10389 ldap.base.dn.0=ou=Users,ou=Groups

Any suggestions?

2

2 Answers

0
votes

Not knowing how Liferay does filters, I cannot imagine that the delimiter for multiple LDAP DN's would be a comma as you have in this line: ldap.base.dn.0=ou=Users,ou=Groups

It seems unlikely that the DN for your users or groups is correct, and that the way to specify more than one location would use a comma to delimit them, since of course a comma is used to delimit LDAP DN's already.

0
votes

Try adding value to "Authentication Search Filter" as (cn=@screen_name@)