ldap3
ldap3 copied to clipboard
v2.9.1: moved from centos 7 to centos stream 9, now getting LDAPSocketOpenError: invalid server address
I have moved my code that uses ldap v2.9.1 from centos 7 (where it is working) to centos stream 9, and now I am getting LDAPSocketOpenError: invalid server address. Nothing in my code has changed; in summary, it uses NTLM like this:
server = 'ldap://x.ad.company.com' userName = "x.ad.company.com\user" passwordString = "a_password" base_dn = 'DC=x,DC=ad,DC=company,DC=com' ldap3_client = Server(server, get_info=ALL) search_filter='(&(objectClass=person)(samaccountname=user))' attributes=['cn','memberOf'] try: with Connection(ldap3_client, user=userName, password=passwordString, auto_bind=True, authentication=NTLM) as conn: conn.search(base_dn, search_filter, search_scope=SUBTREE, get_operational_attributes=True, attributes=attributes) except LDAPBindError:
Any ideas why my code using 2.9.1 would work on centos7, but not on centos stream 9? Thanks
Traceback (most recent call last):
File "/home/centos/./ldap_test.ldap3.py", line 33, in