<?xml version="1.0" encoding="UTF-8"?>
|
<!--
|
! CCPL HEADER START
|
!
|
! This work is licensed under the Creative Commons
|
! Attribution-NonCommercial-NoDerivs 3.0 Unported License.
|
! To view a copy of this license, visit
|
! http://creativecommons.org/licenses/by-nc-nd/3.0/
|
! or send a letter to Creative Commons, 444 Castro Street,
|
! Suite 900, Mountain View, California, 94041, USA.
|
!
|
! You can also obtain a copy of the license at legal-notices/CC-BY-NC-ND.txt.
|
! See the License for the specific language governing permissions
|
! and limitations under the License.
|
!
|
! If applicable, add the following below this CCPL HEADER, with the fields
|
! enclosed by brackets "[]" replaced with your own identifying information:
|
! Portions Copyright [yyyy] [name of copyright owner]
|
!
|
! CCPL HEADER END
|
!
|
! Copyright 2011-2015 ForgeRock AS.
|
!
|
-->
|
<section xml:id="cli-overview"
|
xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xsi:schemaLocation="http://docbook.org/ns/docbook
|
http://docbook.org/xml/5.0/xsd/docbook.xsd"
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
<title>Command-Line Tools</title>
|
<indexterm><primary>Commands</primary></indexterm>
|
|
<para>
|
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.
|
<xref linkend="cli-path-locations" /> indicates where to find the tools.
|
</para>
|
|
<table xml:id="cli-path-locations">
|
<title>Paths To Administration Tools</title>
|
<tgroup cols="3">
|
<thead>
|
<row>
|
<entry>OpenDJ running on...</entry>
|
<entry>OpenDJ installed from...</entry>
|
<entry>Default path to tools...</entry>
|
</row>
|
</thead>
|
<tbody>
|
<row>
|
<entry>Apple Mac OS X, Linux distributions, Oracle Solaris</entry>
|
<entry>.zip</entry>
|
<entry><filename>/path/to/opendj/bin</filename></entry>
|
</row>
|
<row>
|
<entry>Linux distributions</entry>
|
<entry>.deb, .rpm</entry>
|
<entry><filename>/opt/opendj/bin</filename></entry>
|
</row>
|
<row>
|
<entry>Microsoft Windows</entry>
|
<entry>.zip</entry>
|
<entry><filename>C:\path\to\opendj\bat</filename></entry>
|
</row>
|
<row>
|
<entry>Oracle Solaris</entry>
|
<entry>SVR4</entry>
|
<entry><filename>/usr/opendj/bin</filename></entry>
|
</row>
|
</tbody>
|
</tgroup>
|
</table>
|
|
<para>
|
You find the installation and upgrade tools,
|
<command>setup</command>,
|
<command>upgrade</command>,
|
and <command>uninstall</command>,
|
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
|
<filename>/path/to/opendj/bin</filename>
|
you can find these tools in
|
<filename>/path/to/opendj</filename>.
|
For instructions on how to use the installation and upgrade tools, see the
|
<link
|
xlink:show="new"
|
xlink:href="install-guide#install-guide"
|
xlink:role="http://docbook.org/xlink/role/olink"
|
><citetitle>Installation Guide</citetitle></link>.
|
</para>
|
|
<para>
|
All OpenDJ command-line tools take the <option>--help</option> option.
|
</para>
|
|
<para>
|
All commands call Java programs and therefore involve starting a JVM.
|
</para>
|
|
<variablelist>
|
<para>
|
The following list uses the UNIX names for the commands.
|
On Windows all command-line tools have the extension .bat.
|
</para>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#backup-1"
|
xlink:role="http://docbook.org/xlink/role/olink">backup</link></term>
|
<listitem>
|
<para>
|
Backup or schedule backup of directory data.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#base64-1"
|
xlink:role="http://docbook.org/xlink/role/olink">base64</link></term>
|
<listitem>
|
<para>
|
Encode and decode data in base64 format.
|
</para>
|
|
<para>
|
Base64 encoding represents binary data in ASCII,
|
and can be used to encode character strings in LDIF, for example.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#create-rc-script-1"
|
xlink:role="http://docbook.org/xlink/role/olink">create-rc-script</link>
|
(UNIX)</term>
|
<listitem>
|
<para>
|
Generate a script you can use to start, stop, and restart the server
|
either directly or at system boot and shutdown.
|
Use <command>create-rc-script -f <replaceable>script-file</replaceable></command>.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry condition="local-db">
|
<term><link
|
xlink:href="reference#dbtest-1"
|
xlink:role="http://docbook.org/xlink/role/olink">dbtest</link></term>
|
<listitem>
|
<para>
|
Debug databases for <literal>local-db</literal> backends.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#dsconfig-1"
|
xlink:role="http://docbook.org/xlink/role/olink">dsconfig</link></term>
|
<listitem>
|
<para>
|
The <command>dsconfig</command> command is the primary command-line tool
|
for viewing and editing OpenDJ configuration.
|
When started without arguments,
|
<command>dsconfig</command> prompts you
|
for administration connection information.
|
Once connected it presents you with a menu-driven interface
|
to the server configuration.
|
</para>
|
|
<para>
|
When you pass connection information, subcommands,
|
and additional options to <command>dsconfig</command>,
|
the command runs in script mode and so is not interactive.
|
</para>
|
|
<para>
|
You can prepare <command>dsconfig</command> batch scripts
|
by running the command with the <option>--commandFilePath</option> option
|
in interactive mode, then reading from the batch file
|
with the <option>--batchFilePath</option> option in script mode.
|
Batch files can be useful
|
when you have many <command>dsconfig</command> commands to run
|
and want to avoid starting the JVM and setting up a new connection
|
for each command.
|
</para>
|
|
<para>
|
Alternatively, you can read commands from standard input
|
by using the <option>--batch</option> option.
|
</para>
|
|
<para>
|
The <citetitle>Reference</citetitle> pages for the
|
<link
|
xlink:href="reference#dsconfig-1"
|
xlink:role="http://docbook.org/xlink/role/olink"
|
xlink:show="new"
|
>dsconfig</link> command cover subcommands and configuration properties.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#dsjavaproperties-1"
|
xlink:role="http://docbook.org/xlink/role/olink">dsjavaproperties</link></term>
|
<listitem>
|
<para>
|
Apply changes you make to
|
<filename>opendj/config/java.properties</filename>,
|
which sets Java runtime options.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#dsreplication-1"
|
xlink:role="http://docbook.org/xlink/role/olink">dsreplication</link></term>
|
<listitem>
|
<para>
|
Configure data replication between directory servers
|
to keep their contents in sync.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#encode-password-1"
|
xlink:role="http://docbook.org/xlink/role/olink">encode-password</link></term>
|
<listitem>
|
<para>
|
Encode a clear text password according to one of the available storage schemes.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#export-ldif-1"
|
xlink:role="http://docbook.org/xlink/role/olink">export-ldif</link></term>
|
<listitem>
|
<para>
|
Export directory data to LDAP Data Interchange Format,
|
a standard, portable, text-based representation of directory content.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#import-ldif-1"
|
xlink:role="http://docbook.org/xlink/role/olink">import-ldif</link></term>
|
<listitem>
|
<para>
|
Load LDIF content into the directory, overwriting existing data.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#ldapcompare-1"
|
xlink:role="http://docbook.org/xlink/role/olink">ldapcompare</link></term>
|
<listitem>
|
<para>
|
Compare the attribute values you specify with those
|
stored on entries in the directory.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#ldapdelete-1"
|
xlink:role="http://docbook.org/xlink/role/olink">ldapdelete</link></term>
|
<listitem>
|
<para>
|
Delete one entry or an entire branch of subordinate entries in the directory.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#ldapmodify-1"
|
xlink:role="http://docbook.org/xlink/role/olink">ldapmodify</link></term>
|
<listitem>
|
<para>
|
Modify the specified attribute values for the specified entries.
|
</para>
|
<para>
|
Use the <command>ldapmodify</command> command
|
with the <option>-a</option> option to add new entries.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#ldappasswordmodify-1"
|
xlink:role="http://docbook.org/xlink/role/olink">ldappasswordmodify</link></term>
|
<listitem>
|
<para>
|
Modify user passwords.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#ldapsearch-1"
|
xlink:role="http://docbook.org/xlink/role/olink">ldapsearch</link></term>
|
<listitem>
|
<para>
|
Search a branch of directory data for entries
|
that match the LDAP filter you specify.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#ldif-diff-1"
|
xlink:role="http://docbook.org/xlink/role/olink">ldif-diff</link></term>
|
<listitem>
|
<para>
|
Display differences between two LDIF files,
|
with the resulting output having LDIF format.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#ldifmodify-1"
|
xlink:role="http://docbook.org/xlink/role/olink">ldifmodify</link></term>
|
<listitem>
|
<para>
|
Similar to the <command>ldapmodify</command> command,
|
modify specified attribute values for specified entries in an LDIF file.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#ldifsearch-1"
|
xlink:role="http://docbook.org/xlink/role/olink">ldifsearch</link></term>
|
<listitem>
|
<para>
|
Similar to the <command>ldapsearch</command> command,
|
search a branch of data in LDIF for entries matching the LDAP filter you specify.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#list-backends-1"
|
xlink:role="http://docbook.org/xlink/role/olink">list-backends</link></term>
|
<listitem>
|
<para>
|
List backends and base DNs served by OpenDJ directory server.
|
</para>
|
</listitem>
|
</varlistentry>
|
<varlistentry>
|
<term><link
|
xlink:href="reference#make-ldif-1"
|
xlink:role="http://docbook.org/xlink/role/olink">make-ldif</link></term>
|
<listitem>
|
<para>
|
Generate directory data in LDIF,
|
based on templates that define how the data should appear.
|
</para>
|
|
<para>
|
The <command>make-ldif</command> command is designed
|
to help generate test data that mimics data expected in production,
|
but without compromising real, potentially private information.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#manage-account-1"
|
xlink:role="http://docbook.org/xlink/role/olink">manage-account</link></term>
|
<listitem>
|
<para>
|
Lock and unlock user accounts,
|
and view and manipulate password policy state information.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#manage-tasks-1"
|
xlink:role="http://docbook.org/xlink/role/olink">manage-tasks</link></term>
|
<listitem>
|
<para>
|
View information about tasks scheduled to run in the server,
|
and cancel specified tasks.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#rebuild-index-1"
|
xlink:role="http://docbook.org/xlink/role/olink">rebuild-index</link></term>
|
<listitem>
|
<para>
|
Rebuild an index stored in an indexed backend.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#restore-1"
|
xlink:role="http://docbook.org/xlink/role/olink">restore</link></term>
|
<listitem>
|
<para>
|
Restore user data from backup.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#start-ds-1"
|
xlink:role="http://docbook.org/xlink/role/olink">start-ds</link></term>
|
<listitem>
|
<para>
|
Start OpenDJ directory server.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#status-1"
|
xlink:role="http://docbook.org/xlink/role/olink">status</link></term>
|
<listitem>
|
<para>
|
Display information about the server.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#stop-ds-1"
|
xlink:role="http://docbook.org/xlink/role/olink">stop-ds</link></term>
|
<listitem>
|
<para>
|
Stop OpenDJ directory server.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#verify-index-1"
|
xlink:role="http://docbook.org/xlink/role/olink">verify-index</link></term>
|
<listitem>
|
<para>
|
Verify that an index stored in an indexed backend is not corrupt.
|
</para>
|
</listitem>
|
</varlistentry>
|
|
<varlistentry>
|
<term><link
|
xlink:href="reference#windows-service"
|
xlink:role="http://docbook.org/xlink/role/olink">windows-service</link>
|
(Windows only)</term>
|
<listitem>
|
<para>
|
Register OpenDJ as a Windows Service.
|
</para>
|
</listitem>
|
</varlistentry>
|
</variablelist>
|
</section>
|