[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: maintaining uniqueness of uid across subtree's



Sovan_Shatpathy@satyam-infoway.com wrote:

> Hi,
>        Thanks a lot again for your suggestions ..Here we have tried out all the
> possible combinations suggested by you but the meta does not  seem to be
> working.
>
> We have tried with the below mentioned format ... it has not helped as far as
> searching across multiple subtree's is concerned ..

This worked smoothly for me:

> #######################################################################
> # ldbm database definitions
> #######################################################################
>
> database        ldbm
> suffix          "ou=chennay,o=xyz"
> rootdn          "cn=Root,ou=chennay,o=xyz"
> rootpw          ldap
> directory       ./chennay
> lastmod         on
> index           objectClass     pres,eq
>
> database        ldbm
> suffix          "ou=bombay,o=xyz"
> rootdn          "cn=Root,ou=bombay,o=xyz"
> rootpw          ldap
> directory       ./bombay
> index           objectClass     pres,eq
>
> database        ldbm
> suffix          "o=xyz"
> rootdn          "cn=Root,o=xyz"
> rootpw          ldap
> directory       ./xyz
> index           objectClass     pres,eq
>
> #######################################################################
> # meta database definitions
> #######################################################################
>
> database        meta
> suffix          "o=meta"
> lastmod         off
>
>
> uri             "ldap://localhost/ou=chennay,o=meta";
> suffixMassage   "o=meta" "o=xyz"
>
> uri             "ldap://localhost/ou=bombay,o=meta";
> suffixMassage   "o=meta" "o=xyz"
>
> uri             "ldap://localhost/o=meta";
> suffixMassage   "o=meta" "o=xyz"
>
>

I added:


> [host]$ ldapadd -D'cn=Root,ou=chennay,o=xyz' -w ldap
> dn: ou=chennay,o=xyz
> objectClass: organizationalUnit
> ou: chennay
>
> adding new entry ou=chennay,o=xyz
>
> dn: cn=Foo,ou=chennay,o=xyz
> objectClass: person
> cn: Foo
> sn: Bar
>
> adding new entry cn=Foo,ou=chennay,o=xyz
>
>
> [host]$ ldapadd -D'cn=Root,ou=bombay,o=xyz' -w ldap
> dn: ou=bombay,o=xyz
> objectClass: organizationalUnit
> ou: bombay
>
> adding new entry ou=bombay,o=xyz
>
> dn: cn=Mark,ou=bombay,o=xyz
> objectClass: person
> cn: Mark
> sn: Smith
>
> adding new entry cn=Mark,ou=bombay,o=xyz
>
> [host]$ ldapadd -h localhost -D'cn=Root,o=xyz' -w ldap
> dn: o=xyz
> objectClass: organization
> o: xyz
>
> adding new entry o=xyz
>
> dn: ou=some-other,o=xyz
> objectClass: organizationalUnit
> ou: some-other
>
> adding new entry ou=some-other,o=xyz
>
> dn: cn=Fred,ou=some-other,o=xyz
> objectClass: person
> cn: Fred
> sn: Flinnstone
>
> adding new entry cn=Fred,ou=some-other,o=xyz
>
>

Then, if I search for the original suffixes I separately get
the entries of each database; if I search with the suffix of
the meta backend, I get:


> [host]$ ldapsearch -b 'o=meta'
> dn: ou=chennay,o=meta
> objectClass: organizationalUnit
> ou: chennay
>
> dn: ou=bombay,o=meta
> objectClass: organizationalUnit
> ou: bombay
>
> dn: o=meta
> objectClass: organization
> o: xyz
>
> dn: cn=Foo,ou=chennay,o=meta
> objectClass: person
> cn: Foo
> sn: Bar
>
> dn: cn=Mark,ou=bombay,o=meta
> objectClass: person
> cn: Mark
> sn: Smith
>
> dn: ou=some-other,o=meta
> objectClass: organizationalUnit
> ou: some-other
>
> dn: cn=Fred,ou=some-other,o=meta
> objectClass: person
> cn: Fred
> sn: Flinnstone
>

Isn't this what you mean?

> Where could we be possibly going wrong ?? Is it for sure that meta is a solution
> for searching across multiple subtree's ??

That's exactly what it was made for :)

Pierangelo.


--
Dr. Pierangelo Masarati               | voice: +39 02 2399 8309
Dip. Ing. Aerospaziale                | fax:   +39 02 2399 8334
Politecnico di Milano                 | mailto:masarati@aero.polimi.it
via La Masa 34, 20156 Milano, Italy   | http://www.aero.polimi.it/~masarati