Install libpam-ldap by entering the following commands in the terminal:
sudo apt update sudo apt install libpam-ldap
Pluggable Authentication Module for LDAP
This package provides an interface between an LDAP server and the PAM user authentication system. Using it along with libnss-ldapd or libnss-ldap allows LDAP to entirely replace other lookup methods (such as NIS or flat-file) for system account tables.