4.1. LDAP Client Access

You configure LDAP client access by using the command-line tool dsconfig. By default you configure OpenDJ to listen for LDAP when you install.

The standard port number for LDAP client access is 389. If you install OpenDJ directory server as a user who can use port 389 and the port is not yet in use, then 389 is the default port number presented at installation time. If you install as a user who cannot use a port < 1024, then the default port number presented at installation time is 1389.

Procedure 4.1. To Change the LDAP Port Number

  1. Change the port number using the dsconfig command.

    $ dsconfig
     set-connection-handler-prop
     --hostname opendj.example.com
     --port 4444
     --bindDN "cn=Directory Manager"
     --bindPassword password
     --handler-name "LDAP Connection Handler"
     --set listen-port:11389
     --trustAll
     --no-prompt

    This example changes the port number to 11389 in the configuration.

  2. Restart the connection handler so the change takes effect.

    To restart the connection handler, you disable it, then enable it again.

    $ dsconfig
     set-connection-handler-prop
     --hostname opendj.example.com
     --port 4444
     --bindDN "cn=Directory Manager"
     --bindPassword password
     --handler-name "LDAP Connection Handler"
     --set enabled:false
     --trustAll
     --no-prompt
    $ dsconfig
     set-connection-handler-prop
     --hostname opendj.example.com
     --port 4444
     --bindDN "cn=Directory Manager"
     --bindPassword password
     --handler-name "LDAP Connection Handler"
     --set enabled:true
     --trustAll
     --no-prompt