Juan Garcés

Personal Blog

Instalation of OpenLdap

October 20th, 2013

Esta entrada también está disponible en: Spanish

This tutorial was created for the instalation of OpenLdap in Linux RedHat.

For make the instalation of the server we execute:


Finished the instalation, we need to configure the file /etc/openldap/slapd.conf (we can use VIM or the editor that you like)

The first is identify the structure of our tree. In the case of we need load a new schema, we will copy the corresponding file to the directory /etc/openldap/schema/ and after, we will include this in the first lines of the file slapd.conf:

After, we will configure the trunk of our tree, defining the root and the password. You can defining the password in plain text or encripted way. If you need the encripted way, you can execute the command slappasswd, and after insert the password twice, this displays the encoded string.

Now, we will see the directory in that our ldap database is saving.

To prevent errors with the default data, verify that the directory is empty, don’t worry, on server starts, these files are generated again.

Now, we can start our server, executing: service ldap start

If you like that the OpenLdap server starts automaticaly in the server reboot, execute this: chkconfig ldap on, with this OpenLdap starts automaticaly in the server reboot.

To the end, we need initializing the tree, adding the keys (suffix and rootdn) that we defined in our configuration file. For this, we generate a new file containing the below (for example, inicia.ldif):

We add the keys above executing the below (replace localhost and parameters for yours):

With this we finished the instalation of our OpenLdap server. You can begin to use with any tool of administration to load and manage your tree.

Another commands:

Juan Garcés

Personal Blog