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

Procedure建立及修改智慧型參照

您可以使用 DSCC 執行此作業。如需相關資訊,請參閱目錄服務控制中心介面與 DSCC 線上說明。

  1. 若要建立智慧型參照,請使用 referralextensibleObject 物件類別建立項目。

    referral 物件類別可讓預期的 ref 屬性包含 LDAP URL。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