what is directory and how to create distinguished name for LDAP

A directory is a specialized database and listing of information about objects arranged in some order that gives details about each object. The directory and how to create distinguished name for LDAP is explained bellow.


dc – domain component
ou – organisational unit
uid – student identity

Directory clients and servers :
Directories are usually accessed using the client/server model of communication.An application that wants to read or write information in a directory does not access the directory directly. Instead, it calls a function or application
programming interface (API) that causes a message to be sent to another process. This second process accesses the information in the directory on behalf of the requesting application via TCP/IP. The default TCP/IP ports are 636 for
secure communications and 389 for unencrypted communications.

Distinnguished Name : The DN of a LDAP directory will start from bottom to top and each level separated by a comma(,)  .It will represent an unique name,helps to identify the exact location in the directory Structor . From the above directory structor simple example shown bellow.
In this  particular DN the data will be look like the bellow.

Data in the DN

Relative Distinnguished Name(RDN) :RDN represents a point within the namespace hierarchy.RDNs have the form type=value for single valued RDNs. The plus sign (+) is used to form multi-valued RDNs: type=value+type=value.
From the above LDAP Directory structure some of  the example  RDNs are given bellow.
dc=mathsdep etc
So DN is the concatination for RDN’s seperated by comma (,) .

Distinnguished Name(DN) Relative Distinnguished Name(RDN)
Represents the exact location of the directory information tree Represent the relative location of the directory information tree
It is an unique path ie DN should be duplicate It may not be unique and same entries will exist in different locations
 Expl: uid=112,ou=alzebra,dc=mathsdep,dc=college Expl: uid=142


  The  Directory is faster to store data and share the data among the application.
  Security risks are more controllable by using directory structors bz the data is kept and maintained in one place.

Related Posts :
Solution to SSLHandshakeException (skip the certificate for Java and LDAP bind)
Delete an entry from the LDAP directory using java JNDI
Select an entry from LDAP using java JNDI
Update or modify LDAP entry using java JNDI
Add new entry to LDAP using java JNDI
What is LDAP or Lightweight Directory Access Protocol
Get or Set Last Modified Date and Time for a File or directory in java
How to find all hidden files in a folder or directory in java
   [will not be published]

^ <