Command-Line Tools Commands Before you try the examples in this guide, set your PATH to include the OpenDJ directory server tools. Where the tools are located depends on the operating environment and on the packages used to install OpenDJ. indicates where to find the tools. Paths To Administration Tools OpenDJ running on... OpenDJ installed from... Default path to tools... Apple Mac OS X, Linux distributions, Oracle Solaris WebStart, .zip /path/to/opendj/bin Linux distributions .deb, .rpm /opt/opendj/bin Microsoft Windows WebStart, .zip C:\path\to\opendj\bat Oracle Solaris SVR4 /usr/opendj/bin
You find the installation and upgrade tools, setup, upgrade, and uninstall, in the parent directory of the other tools, as these tools are not used for everyday administration. For example, if the path to most tools is /path/to/opendj/bin you can find these tools in /path/to/opendj. For instructions on how to use the installation and upgrade tools, see the Installation Guide. All OpenDJ command-line tools take the option. All commands call Java programs and therefore involve starting a JVM. The following list uses the UNIX names for the commands. On Windows all command-line tools have the extension .bat. backup Backup or schedule backup of directory data. base64 Encode and decode data in base64 format. Base64 encoding represents binary data in ASCII, and can be used to encode character strings in LDIF, for example. create-rc-script (UNIX) Generate a script you can use to start, stop, and restart the server either directly or at system boot and shutdown. Use create-rc-script -f script-file. dbtest Debug databases for local-db backends. dsconfig The dsconfig command is the primary command-line tool for viewing and editing OpenDJ configuration. When started without arguments, dsconfig prompts you for administration connection information. Once connected it presents you with a menu-driven interface to the server configuration. When you pass connection information, subcommands, and additional options to dsconfig, the command runs in script mode and so is not interactive. You can prepare dsconfig batch scripts by running the command with the option in interactive mode, then reading from the batch file with the option in script mode. Batch files can be useful when you have many dsconfig commands to run and want to avoid starting the JVM and setting up a new connection for each command. Alternatively, you can read commands from standard input by using the option. The Reference pages for the dsconfig command cover subcommands and configuration properties. dsjavaproperties Apply changes you make to opendj/config/java.properties, which sets Java runtime options. dsreplication Configure data replication between directory servers to keep their contents in sync. encode-password Encode a clear text password according to one of the available storage schemes. export-ldif Export directory data to LDAP Data Interchange Format, a standard, portable, text-based representation of directory content. import-ldif Load LDIF content into the directory, overwriting existing data. ldapcompare Compare the attribute values you specify with those stored on entries in the directory. ldapdelete Delete one entry or an entire branch of subordinate entries in the directory. ldapmodify Modify the specified attribute values for the specified entries. Use the ldapmodify command with the option to add new entries. ldappasswordmodify Modify user passwords. ldapsearch Search a branch of directory data for entries that match the LDAP filter you specify. ldif-diff Display differences between two LDIF files, with the resulting output having LDIF format. ldifmodify Similar to the ldapmodify command, modify specified attribute values for specified entries in an LDIF file. ldifsearch Similar to the ldapsearch command, search a branch of data in LDIF for entries matching the LDAP filter you specify. list-backends List backends and base DNs served by OpenDJ directory server. make-ldif Generate directory data in LDIF, based on templates that define how the data should appear. The make-ldif command is designed to help generate test data that mimics data expected in production, but without compromising real, potentially private information. manage-account Lock and unlock user accounts, and view and manipulate password policy state information. manage-tasks View information about tasks scheduled to run in the server, and cancel specified tasks. rebuild-index Rebuild an index stored in an indexed backend. restore Restore user data from backup. start-ds Start OpenDJ directory server. status Display information about the server. stop-ds Stop OpenDJ directory server. verify-index Verify that an index stored in an indexed backend is not corrupt. windows-service (Windows only) Register OpenDJ as a Windows Service.