将Liferay用户组导出到OpenLDAP

时间:2016-02-24 07:58:21

标签: liferay openldap

我使用OpenLDAP配置了liferay-portal-6.2-ce-ga4。用户从liferay导入OpenLDAP。但是,liferay的用户组不会导出到OpenLDAP中。这是我的portal-ext.properties:

ldap.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
ldap.server.name=ldapadmin
ldap.auth.enabled=true

ldap.import.enabled=true
ldap.export.enabled=true


ldap.import.on.startup=true
ldap.export.on.startup=true

ldap.export.method.0=group
ldap.export.method.0=user

ldap.password.policy.enabled=true


ldap.base.provider.url.0=ldap://localhost:389
ldap.base.dn.0=dc=test,dc=com
ldap.security.principal.0=cn=admin,dc=test,dc=com
ldap.security.credentials.0=secret

ldap.auth.search.filter.0=(mail=@email_address@)
ldap.import.user.search.filter.0=(objectClass=inetOrgPerson)

ldap.user.mappings.0=userId=uid\nscreenName=cn\nemailAddress=mail\npassword=userPassword\nfirstName=givenName\nlastName=sn



ldap.import.group.search.filter.0=(objectClass=posixGroup)
ldap.group.mappings.0=groupName=cn\ndescription=description\nuser=memberUid
ldap.users.dn.0=ou=people,dc=test,dc=com
ldap.groups.dn.0=ou=groups,dc=test,dc=com

ldap.user.default.object.classes.0=inetOrgPerson, top
ldap.group.default.object.classes.0=posixGroup, top, groupOfUniqueNames,organizationalUnit

我已经通过点击“测试LDAP组”按钮进行了检查我可以看到使用OpenLDAP GUI在OpenLDAP中创建的大约5组,但是看不到我在liferay中创建的任何组。它不是导出用户组的唯一导出用户。请为此提供一些解决方案。

1 个答案:

答案 0 :(得分:0)

我认为您在portal-ext.properties文件中使用的密钥是错误的。

在文档中我们可以阅读:

#
# Settings for exporting users from the portal to LDAP. This allows a user
# to modify his first name, last name, etc. in the portal and have that
# change pushed to the LDAP server. This setting is not used unless the
# property "ldap.auth.enabled" is set to true.
#
ldap.export.enabled=false

#
# Set this to true if groups and their associations should be exported from
# the portal to LDAP. This setting is not used unless the property
# "ldap.auth.enabled" is set to true.
#
ldap.export.group.enabled=true

所以你应该使用:

ldap.export.enabled=true
ldap.export.group.enabled=true