refer command.
nsslapd with the refer option.
/usr/sbin/ns-slapd refer -D /usr/lib/dirsrv/slapd-instance_name[-pport] -rreferral_url
/usr/lib/dirsrv/slapd-instance_name is the directory where the Directory Server configuration files are. This is the default location on Red Hat Enterprise Linux 5 (32-bit) for the location on other platforms, see Section 1.1, “Directory Server File Locations”.
ldap://directory.example.com:389/dc=example,dc=com
"ldap://dir1.example.com:389/dc=example,dc=com" "ldap://dir2.example.com/"
ldapmodify can add a default referral to the cn=config entry in the directory's configuration file. For example, to add a new default referral from one Directory Server, dir1.example.com, to a server named dir2.example.com, add a new line to the cn=config entry.
ldapmodify utility:[2]
ldapmodify -h dir1.example.com -p 389 -D "cn=directory manager" -w secret
ldapmodify binds to the server and prepares it to change an entry in the configuration file.
dir2.example.com server:
dn: cn=config changetype: modify replace: nsslapd-referral nsslapd-referral: ldap://dir2.example.com/
cn=config entry of the directory, the directory will return the default referral in response to requests made by client applications. The Directory Server does not need to be restarted.
uid=jdoe,ou=people,dc=example,dc=com. A smart referral is returned to the client that points to the entry cn=john doe,o=people,l=europe,dc=example,dc=com on the server directory.europe.example.com.
referral object class from the entry.)
ldap://hostname:portnumber/[optional_dn]
ldap://directory.example.com:389/cn=john doe,o=people,l=europe,dc=example,dc=com
ldap://hostname:portnumber/
ldapmodify command-line utility[2] to create smart referrals from the command line.
referral object class. This object class allows a single attribute, ref. The ref attribute must contain an LDAP URL.
uid=jdoe:
dn: uid=jdoe,ou=people,dc=example,dc=com objectclass: referral ref: ldap://directory.europe.example.com/cn=john%20doe,ou=people,l=europe,dc=example,dc=com
%20 instead of spaces in any LDAP URL used as a referral.
uid=jdoe,ou=people,dc=example,dc=com with a referral to directory.europe.example.com, include the following in the LDIF file before importing:
dn: uid=jdoe, ou=people,dc=example,dc=com objectclass: top objectclass: person objectclass: organizationalperson objectclass: inetOrgPerson objectclass: referral cn: john doe sn: doe uid: jdoe ref: ldap://directory.europe.example.com/cn=john%20doe,ou=people, l=europe,dc=example,dc=com
-M option with ldapmodify when there is already a referral in the DN path. For information about the ldapmodify utility, see the Directory Server Configuration, Command, and File Reference.
cn=mapping tree,cn=config branch.
ldapmodify.[2] For example:
ldapmodify -a -h example.com -p 389 -D "cn=directory manager" -w secret
ldapmodify utility binds to the server and prepares it to add information to the configuration file.
ou=people,dc=example,dc=com root suffix, as follows:
dn: cn=ou=people,dc=example,dc=com,cn=mapping tree,cn=config objectclass: extensibleObject objectclasss: nsmappingtree nsslapd-state: referral nsslapd-referral: ldap://zanzibar.com/
nsslapd-state attribute is set to referral, meaning that a referral is returned for requests made to this suffix. The nsslapd-referral attribute contains the LDAP URL of the referral returned by the suffix, in this case a referral to the zanzibar.com server.
nsslapd-state attribute can also be set to referral on update. This means that the database is used for all operations except update requests. When a client application makes an update request to a suffix set to referral on update, the client receives a referral.