Could someone explain objectclass referral to me

Ed Oskiewicz (eoskiewi@jungle.bt.co.uk)
Wed, 25 Sep 1996 11:38:27 +0100

My reading of the slapd admin guide doesn't square with my experience of
trying to get referral working. Let me first explain what I am trying to
achieve.

I have partitioned up our corporate Internal phone book into two parts, one
for the department in which I work, the other for all other divisions in the
company including the division which my department is part of.

The intention being that the local details are rapidly available while
others are there if needed. Hence the big directory contains entries for dns
of the form "cn=xyz,ou=div x,o=bt plc,c=gb" (is there a standard attribute
name for parts of an ou?), the local directory contains dns of the form
"cn=joe soap,ou1=my part,ou=div 3,o=bt plc,c=gb".

I thought I would use referral objects to link the two directories together,
the idea being that the same data would be seen regardless of which
directory was queried. Hence (following chapter 10 of the slapd admin
manual) the local directory contains lots of entries of the form:

dn: ref="ldap://other.host/ou=div 1,o=bt plc, c=gb",o=bt plc, c=gb
objectclass: referral

the remote directory contains one entry of the form:

dn: ref="ldap://my.host/ou1=my part,ou=div 3,o=bt plc, c=gb",o=bt plc, c=gb
objectclass: referral

I am unable to get anything to work when I try to use external dns (unless I
set the referral host on the config file to be other.host in which case I
guess this is the default mechanism working).

If I direct the following query to my local directory:

ldapsearch -b 'o=bt plc, c=gb' objectclass=referral

then I get back

ldap_search: Invalid syntax
ldap_search: additional info: Bad search filter

Which makes me think they are not even in the directory (which explains
why they don't seem to work).

Am I using referral objectclasses correctly? e.g. do I need a ref attribute
for each entry? if I am why can't I list them using ldapsearch? Is the usage
of referral objects documented anywhere (I can't find any reference to this
objectclass except ch 10 of the slapd admin manual which glosses over the
subject). I have not added an objectclass definition anywhere, should I have
done?

Please could someone help because, as always, time is of the essence as I
have to get a demo going by next week.

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