Using the OpenDJ utilities on Windows

Although Windows doesn’t cut it as an application server platform in my world, it is ubiquitous as a client. So much so that even I have to run it on my company laptop. Here’s the quick and dirty on using the OpenDJ utilities on Windows.

I’ve posted previously on installing Windows binary versions of the OpenLDAP client utilities. Since moving aggressively onto OpenDJ as my LDAP server of choice, I’ve replaced the OpenLDAP utilities with their OpenDJ equivalents.

Basically all you need to do is download the OpenDJ zip distribution and copy it someplace reasonable, like “C:appsopendj” and make sure you’ve got Java 1.6 or newer installed (I always make sure JAVA_HOME is mapped in my environment and “JAVA_HOME/bin” in my PATH). You don’t even need to run the setup program (in fact, I recommend you don’t). Then go into your machine’s Advanced properties and add something like the following to your PATH, “C:appsopendjbat” (this is the path to the Windows batch file versions of the utilities).

Among the utilities you’ll get are the usual ldapsearch and ldapmodify. You’ll also get ldif-diff (actually “ldif-diff.bat”), which comes in handy for creating LDIF command files to make an entry or entries on a target look like that/those on a source directory. The syntax for these commands is slightly different from their OpenLDAP counterparts (except for ldif-diff, which has no OpenLDAP counterpart), but invoking a command with the “–help” option should give you the information needed to use them effectively.