March 2019
Beginner
490 pages
12h 40m
English
Python's python-ldap (https://www.python-ldap.org/en/latest/) third-party package provides the necessary functionality to interact with an LDAP server.
You can install this package with the pip command:
$ pip install python-ldap
It is also possible to install python-ldap distributions based on Debian or Ubuntu with the following commands:
sudo apt-get updatesudo apt-get install python-ldap
To begin, you will have to initialize the LDAP connection, where we can replace ldap_server with the IP address of the server and the port number:
import ldapldap_client = ldap.initialize("ldap://<ldap_server>:port_number/")
This method initializes a new connection object to access the given LDAP server, and return an LDAP object ...
Read now
Unlock full access