服务器返回的PythonLDAP和ldap3库的属性数不同。在
缺少的属性是我必须执行一些操作的属性。在
这是我用于ldap3的搜索查询示例:from ldap3 import Server,Connection,ALL_ATTRIBUTES, ALL_OPERATIONAL_ATTRIBUTES,ALL,SEARCH_SCOPE_WHOLE_SUBTREE,SUBTREE
host = something1
user = something2
password = something3
baseDn = something4
search_filter = "(uid=something5)"
server = Server(host, get_info=ALL)
conn = Connection(server,user, password,auto_bind=True,check_names=True)
conn.search(baseDn,search_filter, search_scope=SEARCH_SCOPE_WHOLE_SUBTREE, attributes=['*'])
entry = conn.entries
print(json.loads(entry[0].entry_to_json()))
与python ldap一起使用的搜索查询:
^{pr2}$
如果有人可以发布,是否有任何方法可以检索ldap3中给定查询可用的所有属性。在