【问题标题】:Python 3 pyad get_members: how to list more than 1500 membersPython 3 pyad get_members:如何列出超过 1500 个成员
【发布时间】:2020-02-10 15:07:19
【问题描述】:

使用 pyad 0.6.0。尝试处理 AD 组的成员。如何获得超过 pyad get_members() 方法/LDAP 返回的初始 1500 个组成员?没有找到关于此方法的太多文档。

提前致谢,丹尼斯

【问题讨论】:

  • 注意:我尝试使用范围参数但没有成功。无效。

标签: python-3.x limit ldap-query pyad


【解决方案1】:

我遇到了同样的问题,通过查询所有具有 memberof 和组名的用户来解决它。

import pyad.adquery

q = pyad.adquery.ADQuery()

q.execute_query(
    attributes = ["distinguishedName"],
    where_clause = f"objectClass = 'user' AND objectCategory = 'person' AND memberof = 'CN=GroupName,OU=Global,DC=company,DC=com'",
    base_dn = "DC=company, DC=com")

results = q.get_results()

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-06-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-12
    • 2019-06-03
    • 1970-01-01
    • 2020-03-24
    相关资源
    最近更新 更多