【问题标题】:export liferay user group to OpenLDAP将 liferay 用户组导出到 OpenLDAP
【发布时间】:2016-02-24 21:24:59
【问题描述】:

我使用 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 组”按钮进行了检查,我可以看到大约 5 个使用 OpenLDAP GUI 在 OpenLDAP 中创建的组,但看不到我在 liferay 中创建的任何组。它不导出用户组,它唯一的导出用户。请为此提供一些解决方案。

【问题讨论】:

    标签: liferay openldap


    【解决方案1】:

    我认为您在 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
    

    【讨论】:

    • 我也试过这个。但这也不是导出用户组。
    • 您能否检查 ldap.group.mappings.0 键中是否缺少必需的属性(取决于您的 LDAP 架构)?你有登录你的 LDAP 服务器吗?
    • 我检查过了,没有缺少必需的属性。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-03-26
    • 1970-01-01
    • 2012-08-13
    • 2023-01-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多