Table of Contents


Introduction


Required Packages

sudo apt-get install php-ldap

LDAP Authentication Process

Bind (Initial Connection)

  1. Client connects: The LDAP client (e.g., a user authentication script) connects to the LDAP server.
  2. Bind request: The client sends a bind request to the server, which includes the username (or DN) and password.
  3. Server authenticates: The server checks the username and password against its stored credentials.
  4. Bind response: If the credentials are valid, the server responds with a bind response, indicating a successful connection.
  1. Search request: The client sends a search request to the server, specifying the search base, scope, filter, and attributes to retrieve.
  2. Server searches: The server searches its directory based on the client's request.
  3. Search response: The server responds with a search response, containing the matching entries and their attributes.

Bind on Search Result with Password

  1. Client selects entry: The client selects an entry from the search results.
  2. Client extracts DN: The client extracts the DN (distinguished name) from the selected entry.
  3. Bind request with DN and password: The client sends a new bind request to the server, using the extracted DN and the user-provided password.
  4. Server authenticates: The server checks the DN and password against its stored credentials.
  5. Bind response: If the credentials are valid, the server responds with a bind response, indicating a successful authentication.


Configure LDAP


Test LDAP Settings