LDAP, or Lightweight Directory Access Protocol is a protocol for centrally managing related information. The most common & well known use of LDAP is as for centralized authentication. Install the required packages. On CENTOS 7 I had to change the following: sldaptest failed telling me to add '-u' parameter: so. Step by Step OpenLDAP Server Configuration on CentOS 7 / RHEL 7. OpenLDAP is an open-source implementation of Lightweight Directory Access Protocol developed by OpenLDAP project. LDAP is an Internet protocol that email and other programs use to look up contact information from a server.
This tutorial describes how to install and configure LDAP server (389-DS) in CentOS 7. About 389-DS Server. 389-DS (389 Directory Server) is an open source enterprise class LDAP server for Linux, and is developed by Red Hat community.
Two days ago, one of the website visitors was searching on the website for LDAP and found nothing, that drives me to make a post about LDAP server, so we fill the gaps and bring the loved content to the visitors.
Table of Contents
What is LDAP?
We know that Linux keeps registered users on /etc/passwd file, so if you want to access the machine, you must have a user defined on that file.
This is good when you are working one or few machines, but what if you have hundreds of machines or maybe thousands, and how you will maintain user management tasks like password modification or any other administrative task like somebody left the work and you need to close his account, would you go to every machine to do that?
That could be a nightmare, or you need to create a new account. In this case, we need a centralized user account management system, a database to keep all information related to user accounts.
The most used solution for this problem is the Lightweight Directory Access Protocol (LDAP).
LDAP uses the usual client/server paradigm.
Uses of LDAP
LDAP not only keeps a list of users, but you can also use it as storage for your files.
It can be used for authenticating users as we mentioned above.
You can store DNS records in LDAP server.
LDAP can be used as a yellow pages directory service for an organization to provide information about users or employees, departments, contact information, phone numbers, addresses, private data or whatever.
LDAP Server Implementations
LDAP is an open standard protocol, many companies make its own implementation of the protocol.
There are commercial implementations of LDAP like:
- Microsoft Active Directory.
- Oracle Internet Directory.
- Oracle Unified Directory.
- IBM Security Directory Server.
- UnboundID Directory Server.
- NetIQ eDirectory or eDirectory.
- CA Directory or CA eTrust Directory.
And free open source implementations like:
- OpenLDAP.
- ForgeRock OpenDJ.
- Apache DS.
- 389 Directory Server.
In this post, we will use OpenLDAP which is very common and loved by the community.
OpenLDAP is the open source implementation of LDAP that runs on Linux/UNIX systems.
Installing OpenLDAP
To install OpenLDAP you have to install openldap, openldap-servers and openldap-clients packages.
$yum-yinstall openldap openldap-servers openldap-clients
Or if you are using CentOS 7, you can use dnf or Dandified Yum
$dnf-yinstall openldap openldap-servers openldap-clients
If you are using a Debian based system like Ubuntu, you can install it like this: