Install libnss-ldap by entering the following commands in the terminal:
sudo apt update sudo apt install libnss-ldap
NSS module for using LDAP as a naming service
This package provides a Name Service Switch that allows your LDAP server act as a name service. This means providing user account information, group id's, host information, aliases, netgroups, and basically anything else that you would normally get from /etc flat files or NIS. . If used with glibc 2.1's nscd (Name Service Cache Daemon) it will help reduce your network traffic and speed up lookups for entries.