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

Re: Search base appropriate for searching across multiple database with disparate suffix

Etienne Goyer wrote:


I would like to set up a directory with multiple database.  These
database would store disparate suffix, which are not one "inside"
another.  Hopefully, this slapd.conf snippet will clear it up :

database        bdb
suffix         "dc=example1,dc=ca"
directory       /var/lib/ldap/example1

database        bdb
suffix         "dc=example2,dc=com"
directory       /var/lib/ldap/example2

database        bdb
suffix         "dc=example3,dc=org"
directory       /var/lib/ldap/example3

I would like to be able to search across these three database. What
base DN would I have to provide ? I tried 'ldapsearch -x -s sub -b ""',
but it returned a "result: 32 No such object".


You should "glue" the databases together; in your case, the common root would be "". See slapo-glue(5) if you're using OpenLDAP 2.3 or "subordinate" in slapd.conf(5) if you're using OpenLDAP 2.2. I'm not 100% sure gluing can occur with the empty DN, though. If it's not possible, you may use back-meta (slapd-meta(5)) with empty "" at the end of your slapd.conf and as many targets as your databases are.


SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497