0

汎用ADサービスのネストされたグループメンバーシップを実装する必要があります。以前は、特定の検索フィルター( "member:1.2.840.113556.1.4.1941:=")を使用していました。これにより、単一の検索要求を使用して、そのユーザーが参加しているすべてのグループメンバーシップを取得できました。 。ただし、search-filterはMS ADサーバーでのみ機能し、汎用ADサーバーでは機能しないようです。

したがって、検索リクエストで送信できる特定の検索フィルター(すべてのADサーバーに適用可能)を知っている人はいますか?これにより、単一の検索クエリを介してネストされたグループメンバーシップを取得できます。

これについてご協力いただきありがとうございます。

4

1 に答える 1

0

「member:1.2.840.113556.1.4.1941」はLDAP_MATCHING_RULE_IN_CHAINであり、他のLDAPベンダーによって実装されていない可能性があります。 LDAP Wiki

編集:

グループを再利用したい場合は、次のようなことを行うことができます。

フィルタを使用します。

    (&(objectCategory=organizationalPerson)(objectClass=User)(sAMAccountName=YOURUSER)

    get "distinguishedName"  (this is the user's distinguishedName)
    get "memberOf"  (this is a collection of distinguishedNames of the groups the user is a member of (minus the primary group in MS Active Directory, which should be "Domain Users"))



    Foreach memberOf in the collection: (This is the first level, so there is no need to check if he is there, because he is.)

    (&(objectCategory=group)(distinguishedName=THISMEMBEROF))

    get "member" (this is a collection of distinguishedNames of group members)



    Foreach memberOf in the collection: 

    This is the second level (the groups within the groups), so first check if the users distinguishedName is present.
    (&(objectCategory=group)(distinguishedName=THISMEMBEROF))

    get "member" (this is a collection of distinguishedNames of group members)

Foreach memberOf in the collection: 

This is the third level (the groups within the groups), so first check if the users distinguishedName is present.
(&(objectCategory=group)(distinguishedName=THISMEMBEROF))

get "member" (this is a collection of distinguishedNames of group members)



etc.
于 2012-12-05T20:32:31.133 に答える