The referral object class designates the entry as a referral object. The extensibleObject object class allows you to match the target entry by matching any schema attribute. The following example shows how to set up a smart referral if a portion of a directory information tree (DIT) is located on another server.

To create a referral:

  1. Create an LDIF file with an entry that contains the referral and extensibleObject object classes.
    dn: ou=EngineeringTeam1,ou=People,dc=example,dc=com 
    objectClass: top 
    objectClass: referral 
    objectClass: extensibleObject
    ou: Engineering Team1 
    ref: ldap://server2.example.com:6389/ou=EngineeringTeam1,ou=People,dc=example,dc=com
  2. On the first server, add the referral entry using the ldapmodify command.
    $ bin/ldapmodify --defaultAdd --fileName referral-entry.ldif
  3. To verify the addition, search for a user.
    $ bin/ldapsearch --baseDN ou=People,dc=example,dc=com "(uid=user.4)"
    SearchReference(referralURLs={ldap://server2.example.com:6389/ 
    ou=EngineeringTeam1,ou=People,dc=example,dc=com??sub?})