2016-02-24 48 views
0

我使用OpenLDAP配置了liferay-portal-6.2-ce-ga4。用戶從liferay導入到OpenLDAP中。但liferay的用戶組不會導出到OpenLDAP中。這裏是我的portal-ext.properties:將liferay用戶組導出到OpenLDAP

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=([email protected][email protected]) 
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看到周圍5組,這是在OpenLDAP的創建,但看不到任何組檢查哪些我在liferay中創建。它不會將用戶組導出爲唯一的導出用戶。請爲此提供一些解決方案。

回答

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 
+0

我也嘗試過這一點。但是這也不會導出用戶組。 – Seema

+0

您可以檢查ldap.group.mappings.0項中是否沒有缺少所需的屬性(取決於您的LDAP模式)? 你有沒有登錄你的LDAP服務器? – fabballe

+0

我檢查過,沒有缺少必需的屬性。 – Seema