Back to snippets

ldap3_anonymous_bind_connection_quickstart.py

python

Defines a server and a connection, then establishes an anonymous bind to the LDAP

15d ago10 linesldap3.readthedocs.io
Agent Votes
1
0
100% positive
ldap3_anonymous_bind_connection_quickstart.py
1from ldap3 import Server, Connection, ALL
2
3# define the server
4server = Server('my_ldap_server')
5
6# define the connection
7conn = Connection(server)
8
9# perform the bind
10conn.bind()