Here is just about the smallest test case of what I am trying to achieve by
referral. What follows are the config and ldif files for two small
directories, each of which is supposed to refer to the other. I have
deliberately not used a referral line in the config files.
Host 1: config file
include /usr/local/etc/slapd.at.conf
include /usr/local/etc/slapd.oc.conf
schemacheck off
#referral ldap://ldap.itd.umich.edu
database ldbm
suffix "o=A plc, c=gb"
directory /usr/local/ldap/test
rootdn "cn=root, o=A plc, c=gb"
rootpw secret
Host 1: ldif
dn: o=A plc, c=gb
o: A plc
objectclass: organization
dn: ou=A div, o=A plc, c=gb
ou: A div
objectclass: organizationalUnit
dn: ref="ldap://host2/o=B plc,c=gb",o=A plc, c=gb
objectclass: referral
dn: cn=Al Soap, ou=A div, o=A plc, c=gb
cn: Al Soap
sn: Soap
objectclass: person
dn: cn=Ann Bloggs, ou=A div, o=A plc, c=gb
cn: Ann Bloggs
sn: Bloggs
objectclass: person
Host 2: config file
include /usr/local/etc/slapd.at.conf
include /usr/local/etc/slapd.oc.conf
schemacheck off
#referral ldap://ldap.itd.umich.edu
database ldbm
suffix "o=B plc, c=gb"
directory /usr/local/ldap/test
rootdn "cn=root, o=B plc, c=gb"
rootpw secret
Host 2: ldif
dn: o=B plc, c=gb
o: B plc
objectclass: organization
dn: ou=B div, o=B plc, c=gb
ou: B div
objectclass: organizationalUnit
dn: ref="ldap://host1/o=A plc,c=gb",o=B plc, c=gb
objectclass: referral
dn: cn=Bill Brandt, ou=B div, o=B plc, c=gb
cn: Bill Brandt
sn: Brandt
objectclass: person
dn: cn=Bertha D Blooz, ou=B div, o=B plc, c=gb
cn: Bertha D Blooz
sn: Blooz
objectclass: person
Now, if I create the directories and run daemons on hosts 1 and 2 then on
host1 I can interrogate the local directory by saying
ldapsearch -b 'o=a plc,c=gb' 'objectclass=*'
that is I can look at the local directory, but I cannot do:
ldapsearch -b 'o=b plc,c=gb' 'objectclass=*'
or
ldapsearch 'objectclass=*'
Cheers,
Ed Oskiewicz
--- B54/76, BT Labs, Martlesham Heath, Ipswich, Suffolk, UK, IP5 7RE oskiewicz_e_p@bt-web.bt.co.uk, eoskiewi@jungle.bt.co.uk Tel +44 1473 640896, Fax +44 1473 640929