[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
RE: Multiple bases, with one base including the others
> -----Original Message-----
> From: owner-openldap-software@OpenLDAP.org
> [mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Douglas B. Jones
> Hi,
>
> If I have the following bases in ldap.conf
>
> BASE dc=gpc,dc=edu
> BASE dc=employee,dc=gpc,dc=edu
> BASE dc=student,dc=gpc,dc=edu
Only one default BASE is used in ldap.conf.
> and I have the 'database' entries in the slapd.conf:
>
> ...
> Note that I did not include a "database" line for the first one.
> I could make the first one just be populated/updated with all
> the entries from the last two, but I was wondering if there is
> a way to have the first one automatically include the entries
> in the last two, basically being a superset of the last two.
> Is there any way of doing this without having to have the first
> one (the master so to speak) have a copy of the other sub ones?
> I want to be able to do:
>
> ldapsearch -b 'dc=gpc,dc=edu' -LLL '(uid=jones)' mail
>
> and get the data from both the employee and student ones.
Your slapd.conf syntax is bogus, but what you want is readily supported in
OpenLDAP 2.1. Each naming context must live in a valid database, and the
order in the slapd.conf file is significant - you must define the deepest
subtrees before you define their parent subtrees. For this example, you could
use:
database bdb
suffix "dc=student,dc=gpc,dc=edu'
rootdn "cn=Manager,dc=student,dc=gpc,dc=edu"
subordinate
database bdb
suffix "dc=employee,dc=gpc,dc=edu"
rootdn "cn=Manager,dc=employee,dc=gpc,dc=edu"
subordinate
database bdb
suffix "dc=gpc,dc=edu"
rootdn "cn=Manager,dc=gpc,dc=edu"
See the slapd.conf manpage for information on the "subordinate" keyword,
which causes all the magic to happen.
Note that each database must actually contain an entry corresponding to its
suffix. E.g., you must create a valid entry for dc=gpc,dc=edu in the
dc=gpc,dc=edu database.
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
http://www.symas.com http://highlandsun.com/hyc
Symas: Premier OpenSource Development and Support