使用python3ldap连接到freeIPA demo ldap服务器时出错

2024-05-29 10:14:21 发布

您现在位置:Python中文网/ 问答频道 /正文

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}$

问题到底在哪里


Tags: thetofromorgserverallconnectiondc

热门问题