2012-12-04 6 views
0

일반 AD 서비스의 중첩 그룹 멤버십을 구현해야합니다. 이전에는 단일 검색 요청을 사용하여 해당 사용자가 참여한 모든 그룹 구성원을 확보 할 수있는 특정 검색 필터 ("member : 1.2.840.113556.1.4.1941 : =")를 사용하고있었습니다. 의. 그러나 검색 필터는 MS AD 서버에서만 작동하고 일반 AD 서버에서는 작동하지 않는 것처럼 보입니다.일반 ldap 중첩 그룹 구현

그래서 우리는 검색 요청 (모든 AD 서버에 적용 가능)에서 보낼 수있는 특정 검색 필터를 알고 있습니다.이를 통해 단일 검색 쿼리를 통해 중첩 된 그룹 멤버쉽을 도출 할 수 있습니다.

감사합니다.

답변

0

"member : 1.2.840.113556.1.4.1941"은 LDAP_MATCHING_RULE_IN_CHAIN이며 다른 LDAP 공급 업체에서는 구현할 수 없습니다. LDAP Wiki

편집 :

당신이 그룹 reurse하려는 경우 이런 식으로 뭔가를 할 수있는 다음을 할 수 있는지에

(&(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. 
+0

감사 다로, 그래서 어떤 아이디어 :

를 사용하여 필터를 이 일을하는 일반적인 방법? 즉, NULL을 반환하고 그룹 정보를 하나씩 추출하도록 memberOf 특성을 반복적으로 찾고 있습니다. 어떤 검색 필터에 대한 사용자 입력이 가능합니까? –

+0

목표는 무엇입니까? LDAP 쿼리 여야합니까, 아니면 그룹 구성원 자격에서만 상호 작용할 수 있습니까? 그렇다면 어떤 범위 (범용, 글로벌, 도메인 로컬, 로컬, 도메인 간)입니까? – Daro

+0

저의 목표는 LDAP를 사용하여 지정된 레벨 [(5 중첩 레벨), scope = subtree, base-dn]까지 사용자 중첩 그룹 멤버십을 얻는 것입니다. –