Pages

Sunday 18 August 2013

Installation of Apache Directory for creating LDAP server

This post will show you how to install Apache Directory to create a LDAP server and insert few user records in it which will be used as LDAP authentication for our application.

Firstly we need to download the Apache Directory studio, please visit apache site http://directory.apache.org/studio/download/download-windows.html and download the required version.

Once it is downloaded double click on the exe and follow the steps given below:







Now your installation of Apache directory is done. We will now create an LDAP server on it.

For creating a LDAP server  open the apache directory and go to the LDAP Servers tab and right click --> New --> New Server


Give your server a name and choose one of the listed apache foundation servers and click finish

You can view the configuration properties of your server by right clicking on the server --> Open Configuration. These properties will be used while connecting to the applications.

Now you need to start the server. Right click on the server --> run.

Once the server is started. Right click on the server and create a new LDAP connection by clicking --> Create a connection.

You will get a message for the creation of the new server.

Once the connection is created now we are going to add few user credentials for this go to the LDAP browser and expand DIT --> ou=system --> ou=users as shown below. Right click on ou=users --> New  --> New Entry.

Create entry from scratch --> Next

Select inetOrgPerson from the available object classes --> Add --> Next.

For RDN select uid from the list and enter a username against it. It should be a unique value. This will act as the user for your application.

Update sn and cn value where sn = surname and cn = common name.


As we need a password also for the user against which the user will be authenticated we have to add a new attribute for the password. Right click --> New Attribute


Select userPassword from the list --> Next --> finish.

Enter the password in the Password Editor and press OK.

Now the user has been added to the directory and you can use it for the LDAP authentication. You can now access your LDAP server at ldap://localhost:10389 (see server configurations). Hope this will help you.

No comments:

Post a Comment