Introduction to LDAP Server – OpenDJ 3.0

23 / Feb / 2017 by Mayank Negi 0 comments

opendj

OpenDJ is a directory server which implements a wide range of Lightweight Directory Access Protocols (LDAP). OpenDJ is written in Java language. It was an internal project started by Sun Microsystems, which is now maintained by Forgerock.

Steps to set-up OpenDJ LDAP Server:

  • Register to www.forgerock.com and download the .zip or .deb package.
  • Download the OpenDJ LDAP package to the server.
  • Install supporting JAVA version.
    • sudo apt-get install default-jre
  • Now, install the OpenDJ LDAP package
    • sudo dpkg -i opendj_3.0.0-1_all.deb

This will create “/opt/opendj” directory that contains all the files and binaries required to run OpenDJ.

Instructions to set up and configure OpenDJ LDAP Server:

  • Install the openDJ setup using CLI
    • sudo /opt/opendj/setup --cli
  • The above command will ask for some configurations regarding the setup, provide following inputs:

      • Accept the license (Yes/No) [No]:Yes
      • What would you like to use as the initial root user DN for the Directory Server? [cn=Directory Manager]:cn=admin
      • Please provide and confirm the password to use for the initial root user:****
      • Provide the fully-qualified directory server host name that will be used when generating self-signed certificates for LDAP SSL/StartTLS, the administration 
        connector, and replication [opendj.example.com]:
        
      • On which port would you like the Directory Server to accept connections from LDAP clients? [1389]:1389
      • On which port would you like the Administration Connector to accept connections? [4444]:4444 
      • Do you want to create base DNs in the server? (yes / no) [yes]:yes
      • Provide the backend type:
            1)  JE Backend
            2)  PDB Backend
        Enter choice [1]:1
      • Provide the base DN for the directory data: [dc=example,dc=com]:dc=example,dc=com
      • Options for populating the database:
            1)  Only create the base entry
            2)  Leave the database empty
            3)  Import data from an LDIF file
            4)  Load automatically-generated sample data
        Enter choice [1]:1
      • Do you want to enable SSL? (yes / no) [no]:no
      • Do you want to enable Start TLS? (yes / no) [no]:no
      • Do you want to start the server when the configuration is completed? (yes / no) [yes]:yes
      • What would you like to do?
                   1)  Set up the server with the parameters above
                   2)  Provide the setup parameters again
                   3)  Print equivalent non-interactive command-line
                   4)  Cancel and exit
Enter choice [1]:1
  • This completes the setup of LDAP server.
 To view the data in LDAP Server we setup PHPLdapAdmin, by following step:
sudo apt-get install phpldapadmin

Make Following changes to the “/etc/phpldapadmin/config.php” (line 300):

  • $servers->setValue(‘server’,’host’,'<IP_of_LDAP Server>’);
  • $servers->setValue(‘server’,’port’,<PORT>);      (1389)
  • $servers->setValue(‘login’,’bind_id’,'<Enter_Value_Of_Base_DN>’);      (cn=admin,dc=example,dc=com)

Make Following changes to the “/usr/share/phpldapadmin/lib/TemplateRender.php” (line 2469):

In code $default = $this->getServer()->getValue(‘appearance’,’password_hash’);

Change ‘password_hash’ to  ‘password_hash_custom’

Then restart apache, using the following command

sudo service apache2 restart

Now, setup control panel to administer the LDAP Server, with following steps:

  • Install a Virtual Machine with Ubuntu OS.
  • After VM is setup. Install same OpenDJ Server in VM. Once the setup is complete.
  • Go to the “/opt/openDJ/bin” directory and execute control-panel file
    • ./control-panel
  • This will open the control panel application for OpenDJ LDAP Server. In the prompt, select remote server,
    • Enter the remote address of the OpenDJ LDAP Server, to be administered
    • Select administration port (4444)
    • Select DN (cn=admin)
    • Enter Password (****)

From the control panel console in the VM, we can create entries and administer the OpenDJ LDAP Server as well.

This completes the setup of OpenDJ 3.0 LDAP Server.

FOUND THIS USEFUL? SHARE IT

Leave a Reply

Your email address will not be published. Required fields are marked *