Apache Active Directory — On Your Own

Rajesh
5 min readMay 6, 2019

I know most of the people don’t have an option of connecting their applications or software to Active Directory for testing. this is the same case with me until i decided to try one for self.

In this Medium Story, we will install and create Apache Active Directory and add few users to authenticate against some application or software we intended to use for.

Download Apache DS from → https://directory.apache.org/apacheds/downloads.html

Make sure JDK or a JRE is installed. v6 or more is suitable.

also Make sure you run the installer with root user or privileged user.

wget the package

installing → ./ apacheds-2.0.0.AM25–64bit.bin

Installing Apache Directory Server

Agree the license saying yes

Starting the DS → /etc/init.d/apacheds-2.0.0.AM25-default start

Starting Apache Directory Server
Apache DS Process

Apache Directory Server by default runs on port 10389 ,while most other Directory servers runs on 389

the default user name/password of the directory server are “uid=admin,ou=system”/secret.

Now download the Apache Directory Studio which is an free LDAP Browser to create users and groups in the Apache Active Directory.

download from → https://directory.apache.org/studio/

once you downloaded the Directory studio invoke the ApacheDirectoryStudio.exe

Apache Directory Studio Content

Create new LDAP connection by navigating through LDAP> New Connection

give the connection parameters accordingly

give the connection credentials in the later page:

Bind password will be “secret”

Once you connect to Apache Directory Studio to Apache Directory Server you will see the objects as below which are default:

The following icons are used to distinguish entry types:

By default there is no entry under dc=example,dc=com .

We can create one now. right click on the entry “dc=example,dc=com”>New>New Entry.

we will create 2 Entries one for Users and one for Groups.

Lets Create Users first

Select organizationalUnit under Object Classes

Creating Users

In Next Screen

Summary

Similarly Create Group Entry

Creating Users

Now you should see 2 entries in the example dc

Example DC

Now lets ADD a person to User and get them under a Group

from ou=Users>New>New Entry

Add users

Select inetOrgPerson

give any name you wish in RDN [Relative Distinguished Name]

The Summary Screen will be as below :

now since we created a user with-out a password,lets create one for him.for this you need to click on the yellow + mark as highlighted below.

Choose userPassword as Attribute Type

In next screen choose a language

In this screen click on Enter password where it will take you to password creation page.

Now we have created the user entry, then group need to be created and add the user to that group.

Right-click on the ou=Group node and select New>New Entry.

In the Entry Creation Method pane, select the Create entry from scratch radio button. Click Next.

In Object Classes select groupOfNames

Create devops CN

you will be prompted to add user

The summary page

Add more users to group, this can be done by right clicking and selecting “New Attribute” on the right hand side of the selected group.

Now we are ready to integrate applications with LDAP with some users in it.

a first timer in LDAP/AD configuration. Correction are welcome.

--

--