2012-08-16 63 views
1

我正嘗試將LDAP用戶和組導入到Liferay 6.1中。從Liferay 6.1中的LDAP導入用戶和用戶組

portal-ext.properties,只能導入用戶從LDAP不Usergroups

是否有任何建議,請。

portal-ext.properties

ldap.auth.enabled=true 
ldap.export.enabled=false 
ldap.import.method=user 
ldap.user.impl=com.liferay.portal.security.ldap.LDAPUser 
ldap.server.ids=1 

ldap.server.name.1=STAFF 
ldap.base.provider.url.1=ldap://X.X.X.X:XXX 
ldap.base.dn.1=ou=ABCD,ou=wdf,o=aaa 
ldap.security.principal.1=cn=XXXX,ou=users,o=aaa 
ldap.security.credentials.1=XXXXX 

ldap.auth.search.filter.1=([email protected][email protected]) 
ldap.import.user.search.filter.1=(&(objectClass=inetOrgPerson)(!(loginDisabled=true))) 
ldap.user.mappings.1=screenName=cn\npassword=userPassword\nemailAddress=mail\nfirstName=givenName\nlastName=sn\ngroup=groupMembership\njobTitle=title 
ldap.user.custom.mappings.1=university=company 

ldap.import.group.search.filter.1=(&(objectClass=inetOrgPerson)(!(loginDisabled=true))) 
ldap.group.mappings.1=groupName=company\ndescription=description\nuser=groupMembership 

錯誤消息: 遇到錯誤:

ERROR [liferay/scheduler_dispatch-2][PortalLDAPImporterImpl:698] Unable to import user cn=xxxx: null:null:{cn=cn: xxxx} 
java.lang.NullPointerException 
at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importGroup(PortalLDAPImporterImpl.java:753) 
at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importGroups(PortalLDAPImporterImpl.java:849) 
at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importFromLDAPByUser(PortalLDAPImporterImpl.java:693) 
at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importFromLDAP(PortalLDAPImporterImpl.java:198) 
at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importFromLDAP(PortalLDAPImporterImpl.java:135) 
at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importFromLDAP(PortalLDAPImporterImpl.java:95) 
at com.liferay.portal.security.ldap.PortalLDAPImporterUtil.importFromLDAP(PortalLDAPImporterUtil.java:39) 
at com.liferay.portlet.admin.messaging.LDAPImportMessageListener.doReceive(LDAPImportMessageListener.java:28) 
at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:597) 
at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67) 
at $Proxy285.receive(Unknown Source) 
at com.liferay.portal.kernel.scheduler.messaging.SchedulerEventMessageListenerWrapper.receive(SchedulerEventMessageListenerWrapper.java:73) 
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:63) 
at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:114) 
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:671) 
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:582) 
at java.lang.Thread.run(Thread.java:619) 

用戶導入,但仍然用戶組無法導入

提前感謝名單

回答

1

我想你需要特別注意以下性質portal.properties

# 
# Set either user or group for import method. If set to user, the portal 
# will import all users and the groups associated with those users. If set 
# to group, the portal import all groups and the users associated those 
# groups. This value should be set based on how your LDAP server stores 
# group membership information. 
# 
ldap.import.method=user 
#ldap.import.method=group // may be you can use this 

# 
# If set to true, the group filter will be applied, but only to groups in 
# the specified base DN. If set to false, the filter will not be applied and 
# all groups that are associated with the imported users will be imported 
# regardless of the base DN. 
# 
ldap.import.group.search.filter.enabled=true 

此外我認爲你可以測試是否羣體正在通過進入控制面板進口與否,然後...

  1. 控制面板
  2. 門戶網站設置
  3. Authentication標籤
  4. LDAP標籤
  5. 單擊「添加」或「編輯」(如果LDAP已添加)
  6. 轉到Groups部分並添加相關映射信息,單擊Test LDAP Groups(附帶屏幕快照)。

enter image description here

希望這可以幫助你以某種方式。

+0

普拉卡什你好,謝謝你的回覆, 我已經通過點擊「測試LDAO組」按鈕,我可以看到周圍10組檢查,但同時進口其不導入用戶組的唯一導入用戶 謝謝, krishna – radhakrishna 2012-08-17 08:18:31

+0

您是否嘗試過使用:'ldap.import.method = group'? – 2012-08-17 08:47:07

+0

是的,我嘗試使用ldap.import.method =組,但沒有使用 – radhakrishna 2012-08-17 09:00:59

2

您可能要檢查: https://www.liferay.com/community/forums/-/message_boards/message/15751010

我有同樣的錯誤太多,改變屏幕名映射爲uid從CN解決了我的問題。 cn可以包含空格,我認爲這是我的問題。

問候, 巴林特

+0

因此cn不應該包含空格? – playmaker420 2015-02-16 08:10:10

+1

這是一個相當古老的線程,但我認爲在同步組時應該使用UID而不是CN。 也許你也可以使用CN,如果它們中沒有空格的話。 – 2015-02-16 14:03:32

+0

#ldap.user.mappings = screenName = cn \ npassword = userPassword \ nemailAddress = mail \ nfirstName = givenName \ nlastName = sn ldap。user.mappings = screenName = displayName \ npassword = userPassword \ nemailAddress = mail \ nfirstName = givenName \ nlastName = sn – playmaker420 2015-02-16 15:26:48