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

Re: back-ldap



Tomas Maly wrote:

> I was wondering if the LDAP backend for slapd could be used to get the
> data down one branch of a tree from another branch on the same server
> (or even another server). I'd like to be able to have the same data
> sorted into two different tree structures. I.E. have the REAL data under
> "ou=Engineering,l=California,ou=People,dc=mvista,dc=com" and have
> "l=California,ou=Engineering,ou=People,dc=mvista,dc=com" use the
> LDAP backend such that the server would look the information up under
> the other branch and return it as if it was under the second branch. If
> this could work, how would it? What would I configure and set up? If
> there is some other way of doing this, tell me. Thanks.

Assuming your naming context is "dc=mvista,dc=com",
with a recent devel snapshot you can do:

database ldap
uri ldap://this.host
suffix "l=California,ou=Engineering,ou=People,dc=mvista,dc=com"
suffixmassage "l=California,ou=Engineering,ou=People,dc=mvista,dc=com"
    "ou=Engineering,l=California,ou=People,dc=mvista,dc=com"
# acls and so ...

database ldbm
suffix "dc=mvista,dc=com"
# store real data under
"ou=Engineering,l=California,ou=People,dc=mvista,dc=com"
# other directives ...

This rewrites the naming context of the requests as well as that
of the results to make them appear as if they were stored as
    "l=California,ou=Engineering,ou=People,dc=mvista,dc=com"
while they are actually stored as
    "ou=Engineering,l=California,ou=People,dc=mvista,dc=com"

Otherwise all you can do is:

database ldbm
suffixalias "l=California,ou=Engineering,ou=People,dc=mvista,dc=com"
    "ou=Engineering,l=California,ou=People,dc=mvista,dc=com"
suffix "l=California,ou=Engineering,ou=People,dc=mvista,dc=com"
suffix "dc=mvista,dc=com"
# store real data under
"ou=Engineering,l=California,ou=People,dc=mvista,dc=com"
# other directives ...

This will make searches with base
    "l=California,ou=Engineering,ou=People,dc=mvista,dc=com"
succeed, but results will have naming context
    "ou=Engineering,l=California,ou=People,dc=mvista,dc=com"

Pierangelo Masarati.