Sun Java System Directory Server Enterprise Edition 6.3 管理指南

Procedure创建和修改智能引用

可使用 DSCC 执行此任务。有关信息,请参见目录服务控制中心界面和 DSCC 联机帮助。

  1. 要创建智能引用,请使用 referralextensibleObject 对象类来创建条目。

    referral 对象类允许使用应包含 LDAP URL 的 ref 属性。extensibleObject 对象类允许您将任何模式属性用作命名属性,以便与目标条目相匹配。

    例如,要定义以下可返回智能引用(而不是条目 uid=bjensen)的条目,请使用如下命令:


    $ ldapmodify -a -h host1 -p 1389 -D cn=admin,cn=Administrators,cn=config -w -
    Enter bind password:
    dn: uid=bjensen,ou=People,dc=example,dc=com
    objectclass: top
    objectclass: extensibleObject
    objectclass: referral
    uid: bjensen
    ref: ldap://east.example.com/cn=Babs%20Jensen,ou=Sales,o=east,dc=example,dc=com

    注 –

    服务器将忽略 LDAP URL 中位于空格后的所有信息。因此,在用作引用的任何 LDAP URL 中,都必须使用 %20 代替空格。其他特殊字符必须进行转义。


    定义智能引用之后,对 uid=bjensen 条目的修改实际上将在其他服务器的 cn=Babs Jensen 条目上执行。ldapmodify 命令将自动跟踪引用,例如:


    $ ldapmodify -h host1 -p 1389 -D cn=admin,cn=Administrators,cn=config -w -
    Enter bind password:
    dn: uid=bjensen,ou=People,dc=example,dc=com
    changetype: replace
    replace: telephoneNumber
    telephoneNumber: (408) 555-1234
  2. (可选的)要修改智能引用条目,请使用 ldapmodify-M 选项:


    $ ldapmodify -M -h host1 -p 1389 -D cn=admin,cn=Administrators,cn=config -w -
    Enter bind password:
    dn: uid=bjensen,ou=People,dc=example,dc=com
    changetype: replace
    replace: ref
    ref: ldap://east.example.com/cn=Babs%20Jensen,ou=Marketing,o=east,dc=example,dc=com