<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: LDAP with 2 OU in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/ldap-with-2-ou/m-p/327809#M14810</link>
    <description>&lt;P&gt;You can point the &lt;CODE&gt;searchBaseDN&lt;/CODE&gt; to the common root of the 2 OUs and then set &lt;CODE&gt;searchScope&lt;/CODE&gt; to &lt;CODE&gt;subtree&lt;/CODE&gt;.&lt;/P&gt;
&lt;P&gt;You should also use &lt;CODE&gt;searchFilter&lt;/CODE&gt; to a valid LDAP filter expression to filterout the unwanted entries based on attributes such as for instance:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt; &amp;lt;searchFilter&amp;gt;(&amp;amp;amp;(objectClass=theObjectClassOfMyMembers)(|(ou=firstOU)(ou=secondOU))&amp;lt;/searchFilter&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that for this filter to work you need all the entries to actually have the &lt;CODE&gt;ou&lt;/CODE&gt; attributes stored and indexed (not just the dn).&lt;/P&gt;
&lt;P&gt;You can check the &lt;A href="http://www.ldapexplorer.com/en/manual/109010000-ldap-filter-syntax.htm"&gt;LDAP filter syntax&lt;/A&gt; for more complex filtering options. I would advise you to use a tool such as &lt;A href="http://directory.apache.org/studio/"&gt;Apache Directory Studio&lt;/A&gt; to simulate the right baseDN / scope / filters combo that works for you.&lt;/P&gt;</description>
    <pubDate>Thu, 22 Nov 2012 11:21:42 GMT</pubDate>
    <dc:creator>Olivier_Grisel</dc:creator>
    <dc:date>2012-11-22T11:21:42Z</dc:date>
    <item>
      <title>LDAP with 2 OU</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/ldap-with-2-ou/m-p/327808#M14809</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I want to connect Nuxeo with our LDAP. But persons are saved in several "OU".
How can I do it ?
I try with  "multi-users-directory" but it doesn't work.&lt;/P&gt;
&lt;P&gt;I create a file default-ldap-users-directory-bundle.xml with configuration of ldap :&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;1 directory for OU=firstOU&lt;/LI&gt;
&lt;LI&gt;1 directory for OU=secondOU&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Then I create a file default-multi-users-directory-bundle.xml with that :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;component name="org.nuxeo.ecm.directory.multi.config"&amp;gt;
  &amp;lt;extension target="org.nuxeo.ecm.directory.multi.MultiDirectoryFactory" point="directories"&amp;gt;
    &amp;lt;directory name="userDirectory"&amp;gt;
      &amp;lt;schema&amp;gt;user&amp;lt;/schema&amp;gt;
      &amp;lt;idField&amp;gt;username&amp;lt;/idField&amp;gt;
      &amp;lt;passwordField&amp;gt;password&amp;lt;/passwordField&amp;gt;
      &amp;lt;source name="userLDAPSourceFirst" creation="false"&amp;gt;
        &amp;lt;subDirectory name="firstOU"/&amp;gt;
        &amp;lt;optional&amp;gt;true&amp;lt;/optional&amp;gt;
      &amp;lt;/source&amp;gt;
      &amp;lt;source name="userLDAPSourceSecond" creation="false"&amp;gt;
        &amp;lt;subDirectory name="secondOU"/&amp;gt;
        &amp;lt;optional&amp;gt;true&amp;lt;/optional&amp;gt;
      &amp;lt;/source&amp;gt;
    &amp;lt;/directory&amp;gt;
  &amp;lt;/extension&amp;gt;
&amp;lt;/component&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I can connecte with firstOU and in adminCenter I can see persons of firstOU. But it doesn't work for seondOU.
In server.log, I have an error :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;ERROR [org.nuxeo.ecm.platform.login.NuxeoLoginModule] createIdentity failed
javax.security.auth.login.LoginException: principal Administrator does not exist
     at org.nuxeo.ecm.platform.login.NuxeoLoginModule.createIdentity(NuxeoLoginModule.java:300) ...
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Can anyone help me ? Has anyone an exemple of that ? Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2012 18:05:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/ldap-with-2-ou/m-p/327808#M14809</guid>
      <dc:creator>delphine_</dc:creator>
      <dc:date>2012-11-12T18:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: LDAP with 2 OU</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/ldap-with-2-ou/m-p/327809#M14810</link>
      <description>&lt;P&gt;You can point the &lt;CODE&gt;searchBaseDN&lt;/CODE&gt; to the common root of the 2 OUs and then set &lt;CODE&gt;searchScope&lt;/CODE&gt; to &lt;CODE&gt;subtree&lt;/CODE&gt;.&lt;/P&gt;
&lt;P&gt;You should also use &lt;CODE&gt;searchFilter&lt;/CODE&gt; to a valid LDAP filter expression to filterout the unwanted entries based on attributes such as for instance:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt; &amp;lt;searchFilter&amp;gt;(&amp;amp;amp;(objectClass=theObjectClassOfMyMembers)(|(ou=firstOU)(ou=secondOU))&amp;lt;/searchFilter&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that for this filter to work you need all the entries to actually have the &lt;CODE&gt;ou&lt;/CODE&gt; attributes stored and indexed (not just the dn).&lt;/P&gt;
&lt;P&gt;You can check the &lt;A href="http://www.ldapexplorer.com/en/manual/109010000-ldap-filter-syntax.htm"&gt;LDAP filter syntax&lt;/A&gt; for more complex filtering options. I would advise you to use a tool such as &lt;A href="http://directory.apache.org/studio/"&gt;Apache Directory Studio&lt;/A&gt; to simulate the right baseDN / scope / filters combo that works for you.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2012 11:21:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/ldap-with-2-ou/m-p/327809#M14810</guid>
      <dc:creator>Olivier_Grisel</dc:creator>
      <dc:date>2012-11-22T11:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: LDAP with 2 OU</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/ldap-with-2-ou/m-p/327810#M14811</link>
      <description>&lt;P&gt;Thanks for your help.&amp;lt;br/&amp;gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2012 11:17:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/ldap-with-2-ou/m-p/327810#M14811</guid>
      <dc:creator>delphine_</dc:creator>
      <dc:date>2012-11-23T11:17:55Z</dc:date>
    </item>
  </channel>
</rss>

