Working with OpenDJ Server configs

This post provides examples of dsconfig usage for OpenDJ config management. I might expand and update the post in the future, as i find more info.

All the logs audit trails will be saved as long as you use OpenDJ supplied tools for modifying the DJ configs:
Tools are:

  • OpenDJ Control Panel and
  • openDJ command line tools, located under /bin directory, of the OpenDJ install

You could also modify the config files directly, via vi or nano, if you don’t care about proper audit trail or automatic config file backups, each time you modify something.

config.ldif is the current config file for OpenDJ, under OpenDJ install/config/ folder. There is also another file called “config.ldif.startok”, which is last well known config file that worked.
“archived-configs” under OpenDJ/config/ contains backups taken each time you used the proper tool to modify the config files.

It’s highly suggested/recommended to use the DJ tools; Control Panel or command line tools, for proper config rollback and archiving.

To view or edit or modify configuration files you need to use “dsconfig” tool, which is located under bin/ folder.
the following are execution methods for “dsconfig”

  1. Standard
  2. Scripted
  3. Interactive
  4. Teaching

Interactive method– provides you with Interactive menu driven screen.

Example: “dsconfig”

dsconfig interactive mode
dsconfig interactive mode


Teaching method– provides you with Interactive menu driven screen, execute the command, and gives you equivalent cli command.
Example: ” dsconfig –displayCommand”

dsconfig -displayCommand
dsconfig -displayCommand

You need to run “dsconfig –commandFilePath listbackendcli.txt”, if you want the output of the command in a text file, rather than displayed on the screen. This way you could get started with cli or save it if you want to script it in the future.

Standard method – is your cli command line.
Example “dsconfig list-backends”

dsconfig list-backends
dsconfig list-backends

Scripted method – is just that, dump your cli command line in script, and make it work 🙂

You need to create a “” file that includes common settings with servername, Directory Manager Name, Administration port number, so it does not ask you same questions each time you run “dsconfig” or other OpenDJ tools.

Sample “” file:

I personally would not save “bindDN” nor “bindPassword” in the tools,properties config file. If, you are one of many admins, then save the file under “userhomedir/.opendj/”

Otherwise, you could save it under opendj install “config/”. Again, without “bindDN” and “bindPassword”, let each admin use their username/password combo to make the necessary changes in OpenDJ.





All DJ tools

Export java path

Please follow and like us: