質問: Active Directory で次のような DN を処理する方法:
" myAttribute1 =val1 + myAttribute2 =val2 + myAttribute3 =val3, OU=instance1, DC=adtest"
注: ここには CN がありません。RDN は、カスタム定義クラスmyAttribute1、myAttribute2、およびmyAttribute3によってのみ定義されます。
詳細: OpenDS から Active Directory に移行するために必要なスキーマの説明があります。
しかし、多値の RDN は Active Directory の問題のようです。
上記の DN を使用したルックアップは、OpenDS で正常に機能します。しかし、Active Directory で同じ検索を行うと、次の例外が発生します。
javax.naming.InvalidNameException: "myAttribute1=val1 + myAttribute2=val2 myAttribute3=val3": [LDAP: エラー コード 34 - 0000208F: LdapErr: DSID-0C090715, コメント: 名前、データ 0、v1db1 の処理中にエラーが発生しました];
これが私のスキーマ定義です。最初の OpenDS:
objectClasses: ( 1.3.6.1.4.1.99.2
NAME 'myNewClass'
SUP top STRUCTURAL
MUST ( myAttribute1 $ myAttribute2 $ myAttribute3 )
MAY someOtherAttribute
)
そして、これは私が Active Directory に対して行ったことです。
# Class: myNewClass
dn: cn=myNewClass,cn=Schema,cn=Configuration,dc=X
changetype: add
objectClass: classSchema
governsID: 1.3.6.1.4.1.99.2
ldapDisplayName: myNewClass
adminDisplayName: myNewClass
objectClassCategory: 0
systemOnly: FALSE
# subclassOf: top
subclassOf: 2.5.6.0
# rdnAttId: myAttribute1
rdnAttId: 1.3.6.1.4.1.99.1
# mustContain: myAttribute2
mustContain: 1.3.6.1.4.1.99.2
# mustContain: myAttribute3
mustContain: 1.3.6.1.4.1.99.3
# mayContain: someOtherAttribute
mayContain: 1.3.6.1.4.1.99.4
# possSuperiors: organizationalUnit
possSuperiors: 2.5.6.5
# defaultObjectCategory: myNewClass
defaultObjectCategory: cn=myNewClass,cn=Schema,cn=Configuration,dc=X
問題は rdnAttId に関連していると思います - そこにどの値を入れるべきかわかりません。最初にCNをそこに入れようとしました->うまくいきませんでした。次に、カスタム定義の属性 (myAttribute1) を使用しようとしましたが、どちらも機能しませんでした。