Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to get ldap server details python3

I am getting none as output for below code

from ldap3 import Server, Connection, ALL, NTLM
server = Server('servername', get_info=ALL)
conn = Connection(server, user="uname", password="pwd", authentication=NTLM)
print(server.info)
like image 783
Amruth Avatar asked Aug 04 '26 23:08

Amruth


1 Answers

You must bind to the server for reading info. Just use “conn.bind()” to open the connection before printing.

like image 118
cannatag Avatar answered Aug 08 '26 08:08

cannatag



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!