Home > Articles > Operating Systems, Server > Linux/UNIX/Open Source

  • Print
  • + Share This
From the author of

Reconfigure the OpenLDAP Server

You can reconfigure the OpenLDAP server by modifying the file /etc/ldap/slapd.conf. Alternatively, you can run an interactive screen-driven command. I suggest the latter until you're completely comfortable with your OpenLDAP server. The command to reconfigure is:

sudo dpkg-reconfigure slapd

This should result in a screen similar to that illustrated in Figure 2.

Figure 2

Figure 2 Reconfiguring the OpenLDAP server

Select the "No" option in order to ensure that an initial setup is created. This will take you to the DNS domain configuration illustrated in Figure 3.

Figure 3

Figure 3 Defining the DNS domain name

After pressing <Ok> in Figure 3, you'll be brought to the organization name configuration screen in Figure 4.

Figure 4

Figure 4 Organization name configuration

After entering the organization name, you'll be prompted to enter an administrative password as illustrated in Figure 5.

Figure 5

Figure 5 Enter an administrative password

Enter any old password you like and make a note of it for use later on. After entering the password in Figure 5, you'll be prompted to repeat the password (this screen is not shown—you get the idea!) and finally you should see the package configuration screen illustrated in Figure 6.

Figure 6

Figure 6 The package configuration screen

On my system, I had to press the right arrow key to navigate to the "Ok" option in Figure 6. Once selected, you should then see the selection of the database backend in Figure 7.

Figure 7

Figure 7 Selecting the database backend

Just choose the Berkley Database (BDB) option in Figure 7, at which point you should see the database removal options in Figure 8. Select the "No" option in Figure 8 unless you want to delete an existing database. It's useful to delete an old database if you make any mistakes the first time around!

Figure 8

Figure 8 Remove the database

Following Figure 8, you may see some screens that mention LDAPv2 and backup options. Just select the defaults, and you should be ready to run the newly configured OpenLDAP server. In fact, if this is the first time you've reconfigured the OpenLDAP server, it should be automatically started for you as the last step in the process. In any case, you can easily check if the server is running using Figure 1 and our old friend:

ps auwx _ grep slapd

You can check the configuration settings just made by editing the file /etc/ldap/slapd.conf.

Let's now get down to using the OpenLDAP server.

  • + Share This
  • 🔖 Save To Your Account