LDAP错误 - 无法登录到Portal

时间:2015-10-07 16:26:19

标签: java liferay

我的联合开发人员对Liferay的LDAP配置进行了一些更改,现在我们无法登录门户网站(LDAP或手动登录),并返回以下异常:

16:19:01,330 ERROR [http-nio-20110-exec-2][MainServlet:477] com.liferay.portal.ModelListenerException: javax.naming.NameNotFoundException:
[LDAP: error code 32 - No Such Object]; remaining name 'cn=admin,'
com.liferay.portal.ModelListenerException: javax.naming.NameNotFoundException: 
[LDAP: error code 32 - No Such Object]; remaining name 'cn=admin,'

...
16:28:15,372 ERROR [liferay/scheduler_dispatch-4][PortalLDAPImporterImpl:210] Error importing LDAP users and groups
javax.naming.directory.InvalidSearchFilterException: Empty filter; remaining name 'dc=mycompany,dc=com'

我无法访问控制面板以重置配置 - 有没有办法在portal-ext.properties或数据库中重置它?

1 个答案:

答案 0 :(得分:1)

在portal-ext.properties中,您可以使用此密钥:

 (?m)             # Multi-line mode
 ^                # Beginning of line            
 [^ \r\n]*        # Optional non-space, nor line break
 \K               # Construct, ignore previously matched
 [ ]              # A single space

另一种解决方案是添加另一个ldap配置。为了做到这一点,只需在每个属性上增加.0,如:

ldap.auth.required=
ldap.auth.enabled=

ldap.base.provider.url.0=
ldap.base.dn.0=
ldap.security.principal.0=
ldap.security.credentials.0=
ldap.auth.search.filter.0=
ldap.user.mappings.0=