This is the sample code copied from the documentation page of ldap3http://ldap3.readthedocs.io/tutorial_searches.html#finding-entries. I am trying to make a connection to ldap but its not working for the free test ldap and even my own ldap server.
测试.py
from ldap3 import Server, Connection, ALL
server = Server('ipa.demo1.freeipa.org', get_info=ALL)
conn = Connection(server, 'uid=admin,cn=users,cn=accounts,dc=demo1,dc=freeipa,dc=org', 'Secret123', auto_bind=True)
conn.search('dc=demo1,dc=freeipa,dc=org', '(objectclass=person)')
print(conn.entries)
出于测试目的,尝试连接到测试服务器,这是我在尝试连接时遇到的常见错误。在
错误消息
^{pr2}$问题到底在哪里
目前没有回答
相关问题 更多 >
编程相关推荐