{"id":45145,"date":"2017-02-23T14:08:22","date_gmt":"2017-02-23T08:38:22","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=45145"},"modified":"2017-05-01T15:35:31","modified_gmt":"2017-05-01T10:05:31","slug":"introduction-to-ldap-server-opendj-3-0","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/introduction-to-ldap-server-opendj-3-0\/","title":{"rendered":"Introduction to LDAP Server &#8211; OpenDJ 3.0"},"content":{"rendered":"<h3><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-45148\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/01\/opendj.png\" alt=\"opendj\" width=\"381\" height=\"153\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/01\/opendj.png 381w, \/blog\/wp-ttn-blog\/uploads\/2017\/01\/opendj-300x120.png 300w\" sizes=\"(max-width: 381px) 100vw, 381px\" \/><\/h3>\n<p>OpenDJ is a directory server which implements a wide range of <a title=\"LDAP integration with AEM\" href=\"http:\/\/www.tothenew.com\/blog\/ldap-integration-with-aem-apache-directory-server\/\">Lightweight Directory Access Protocols<\/a> (LDAP). OpenDJ is written in Java language. It was an internal project started by Sun Microsystems, which is now maintained by Forgerock.<\/p>\n<h3 id=\"LDAPOpenDJ3.0SetupGuide-FollowingarethestepstosetupOpenDJLDAPServer:\">Steps to set-up OpenDJ LDAP Server:<\/h3>\n<ul>\n<li>Register to\u00a0www.forgerock.com\u00a0and download the .zip or .deb package.<\/li>\n<li>Download the OpenDJ LDAP package to the server.<\/li>\n<li>Install supporting JAVA version.\n<ul>\n<li>\n<pre class=\"screen\"><strong class=\"userinput\"><code>sudo apt-get install default-jre<\/code><\/strong><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li>Now, install the OpenDJ LDAP package\n<ul>\n<li>\n<pre class=\"screen\"><strong class=\"userinput\"><code>sudo dpkg -i opendj_3.0.0-1_all.deb<\/code><\/strong><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p id=\"LDAPOpenDJ3.0SetupGuide-Thiswillcreate&quot;\/opt\/opendj&quot;directorythatcontainsallthefilesandbinariesrequiredtorunOpenDJ.\">This will create &#8220;\/opt\/opendj&#8221; directory that contains all the files and binaries required to run OpenDJ.<\/p>\n<p><strong>Instructions to set up and configure OpenDJ LDAP Server:<\/strong><\/p>\n<ul>\n<li>Install the openDJ setup using CLI\n<ul>\n<li>\n<pre><code>sudo \/opt\/opendj\/setup --cli<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p id=\"LDAPOpenDJ3.0SetupGuide-Theabovecommandwillaskforsomeconfigurationsregardingthesetup,providefollowinginputs:\">The above command will ask for some configurations regarding the setup, provide following inputs:<\/p>\n<ul>\n<li>\n<ul>\n<li>\n<pre class=\"screen\"><code class=\"computeroutput\">Accept the license (Yes\/No) [No]:Yes<\/code><\/pre>\n<\/li>\n<li>\n<pre class=\"screen\"><code class=\"computeroutput\">What would you like to use as the initial root user DN for the Directory Server? [cn=Directory Manager]:cn=admin<\/code><\/pre>\n<\/li>\n<li>\n<pre class=\"screen\"><code class=\"computeroutput\">Please provide and confirm the password to use for the initial root user:****<\/code><\/pre>\n<\/li>\n<li>\n<pre class=\"screen\"><code class=\"computeroutput\">Provide the fully-qualified directory server host name that will be used when generating self-signed certificates for LDAP SSL\/StartTLS, the administration \r\nconnector, and replication [opendj.example.com]:\r\n<\/code><\/pre>\n<\/li>\n<li>\n<pre class=\"screen\"><code class=\"computeroutput\">On which port would you like the Directory Server to accept connections from LDAP clients? [1389]:1389<\/code><\/pre>\n<\/li>\n<li>\n<pre class=\"screen\"><code class=\"computeroutput\">On which port would you like the Administration Connector to accept connections? [4444]:4444 <\/code><\/pre>\n<\/li>\n<li>\n<pre class=\"screen\"><code class=\"computeroutput\">Do you want to create base DNs in the server? (yes \/ no) [yes]:yes<\/code><\/pre>\n<\/li>\n<li>\n<pre class=\"screen\"><code class=\"computeroutput\">Provide the backend type:\r\n    1)  JE Backend\r\n    2)  PDB Backend<\/code><\/pre>\n<pre class=\"screen\"><code class=\"computeroutput\">Enter choice [1]:<\/code><strong>1<\/strong><\/pre>\n<\/li>\n<li>\n<pre class=\"screen\"><code class=\"computeroutput\">Provide the base DN for the directory data: [dc=example,dc=com]:<\/code>dc=example,dc=com<\/pre>\n<\/li>\n<li>\n<pre class=\"screen\"><code class=\"computeroutput\">Options for populating the database:<\/code><\/pre>\n<pre class=\"screen\"><code class=\"computeroutput\">    1)  Only create the base entry\r\n    2)  Leave the database empty\r\n    3)  Import data from an LDIF file\r\n    4)  Load automatically-generated sample data<\/code><\/pre>\n<pre class=\"screen\"><code class=\"computeroutput\">Enter choice [1]:<\/code><strong>1<\/strong><\/pre>\n<\/li>\n<li>\n<pre class=\"screen\"><code class=\"computeroutput\">Do you want to enable SSL? (yes \/ no) [no]:no<\/code><\/pre>\n<\/li>\n<li>\n<pre class=\"screen\"><code class=\"computeroutput\">Do you want to enable Start TLS? (yes \/ no) [no]:no<\/code><\/pre>\n<\/li>\n<li>\n<pre class=\"screen\"><code class=\"computeroutput\">Do you want to start the server when the configuration is completed? (yes \/ no) [yes]:yes<\/code><\/pre>\n<\/li>\n<li>What would you like to do?<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<div>\n<pre class=\"screen\"><code class=\"computeroutput\">                   1)  Set up the server with the parameters above\r\n                   2)  Provide the setup parameters again\r\n                   3)  Print equivalent non-interactive command-line\r\n                   4)  Cancel and exit<\/code><\/pre>\n<pre><code class=\"computeroutput\">Enter choice [1]:<\/code><strong>1<\/strong><\/pre>\n<ul>\n<li>This completes the setup of LDAP server.<\/li>\n<\/ul>\n<h5>\u00a0To view the data in LDAP Server we setup PHPLdapAdmin, by following step:<\/h5>\n<pre><strong>sudo apt-get install phpldapadmin<\/strong><\/pre>\n<p>Make Following changes to the<strong> &#8220;\/etc\/phpldapadmin\/config.php&#8221;<\/strong> (line 300):<\/p>\n<ul>\n<li>$servers-&gt;setValue(&#8216;server&#8217;,&#8217;host&#8217;,'&lt;IP_of_LDAP Server&gt;&#8217;);<\/li>\n<li>$servers-&gt;setValue(&#8216;server&#8217;,&#8217;port&#8217;,&lt;PORT&gt;); \u00a0 \u00a0 \u00a0(1389)<\/li>\n<li>$servers-&gt;setValue(&#8216;login&#8217;,&#8217;bind_id&#8217;,'&lt;Enter_Value_Of_Base_DN&gt;&#8217;); \u00a0 \u00a0 \u00a0(cn=admin,dc=example,dc=com)<\/li>\n<\/ul>\n<p>Make Following changes to the &#8220;\/usr\/share\/phpldapadmin\/lib\/TemplateRender.php&#8221; (line 2469):<\/p>\n<p>In code\u00a0$default = $this-&gt;getServer()-&gt;getValue(&#8216;appearance&#8217;,&#8217;password_hash&#8217;);<\/p>\n<p>Change <strong>&#8216;password_hash&#8217;<\/strong> to <strong>\u00a0&#8216;password_hash_custom&#8217;<\/strong><\/p>\n<p>Then restart apache, using the following command<\/p>\n<pre><strong>sudo service apache2 restart<\/strong><\/pre>\n<p><strong>Now, setup control panel to administer the LDAP Server, with following steps:<\/strong><\/p>\n<ul>\n<li>Install a Virtual Machine with Ubuntu OS.<\/li>\n<li>After VM is setup. Install same OpenDJ Server in VM. Once the setup is complete.<\/li>\n<li>Go to the &#8220;\/opt\/openDJ\/bin&#8221; directory and execute control-panel file\n<ul>\n<li>.\/control-panel<\/li>\n<\/ul>\n<\/li>\n<li>This will open the control panel application for OpenDJ LDAP Server. In the prompt, select remote server,\n<ul>\n<li>Enter the remote address of the OpenDJ LDAP Server, to be administered<\/li>\n<li>Select administration port (4444)<\/li>\n<li>Select DN (cn=admin)<\/li>\n<li>Enter Password (****)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>From the control panel console in the VM, we can create entries and administer the OpenDJ LDAP Server as well.<\/p>\n<p>This completes the setup of OpenDJ 3.0 LDAP Server.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>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\u00a0www.forgerock.com\u00a0and download the .zip or .deb package. Download the OpenDJ LDAP [&hellip;]<\/p>\n","protected":false},"author":916,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":64},"categories":[2348,1],"tags":[248,4843,1892,4421,4844,1245,4420],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/45145"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/916"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=45145"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/45145\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=45145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=45145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=45145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}