LDAP 查詢以檢查用戶是否是特定安全組的成員 (LDAP Query to check if User is a member of a particular security group)


問題描述

LDAP 查詢以檢查用戶是否是特定安全組的成員 (LDAP Query to check if User is a member of a particular security group)

我正在嘗試調整以下查詢以查明用戶是否是特定組(安全組)的成員,但我沒有讓它工作並且我無法完全理解它。

(&(objectClass=user)(sAMAccountName=yourUserName)
  (memberof=CN=YourGroup,OU=Users,DC=YourDomain,DC=com))

在我的例子中,用戶是 XYZ,security group 被稱為 [SecITGroup]。然而,用戶位於 OU=USERS OU=GO OU=AzureSync 下。

我嘗試了以下方法:

(&(objectClass=user)(sAMAccountName=XYZ)
      (memberof=CN=SecITGroup,OU=AzureSync,OU=GO,OU=USR,DC=de,DC=domain,DC=int))

是的,我設置了域名稱為實際域,並顯示 No result is shown
return 屬性我應該返回什麼?


參考解法

方法 1:

I found a solution or a workaround to this.
The LDAP Query is rather to say show me users in the specific group:

(&(objectCategory=user)(memberOf=CN=Administrators,OU=Admin,OU=Groups,DC=domain,DC=com))

The attribute is sAMAccountname which displays the user's name.

(by BuckiBucki)

參考文件

  1. LDAP Query to check if User is a member of a particular security group (CC BY‑SA 2.5/3.0/4.0)

#ldap






相關問題

LDAP 在 PHP 中搜索多個 DN (LDAP search multiple DNs in PHP)

LDAP ke lingkungan mainframe (LDAP to a mainframe environment)

Пошукавы фільтр укладзеных груп LDAP (Nested Group LDAP Search Filter)

Why can't I bind my LDAP server in Perl code? (Why can't I bind my LDAP server in Perl code?)

如何通過 LDAP over TLS 對 Active Directory 進行身份驗證? (How to authenticate against Active Directory via LDAP over TLS?)

在 GForge、LDAP 身份驗證中,如何設置屬性 authenticatedBind 的值? (In GForge, LDAP Authentication, how do I set the value for the property authenticatedBind?)

什麼 ldap 查詢返回現在從活動目錄中刪除的用戶對象? (What ldap query returns the user objects now removed from active-directory?)

LDAP 和 Active Directory 有什麼區別? (What are the differences between LDAP and Active Directory?)

從 asp.net Web 應用程序的活動目錄中獲取用戶的全名 (Get user's full name from active directory in asp.net web application)

Grails Spring 安全配置通過 xml (Grails Spring Security Configuration thru xml)

如何為我的 Web 應用程序構建 LDAP 集成? (How to build LDAP integration for my web app?)

LDAP 查詢以檢查用戶是否是特定安全組的成員 (LDAP Query to check if User is a member of a particular security group)







留言討論