7321N/A<?xml version="1.0" encoding="UTF-8"?>
7321N/A<!--
7321N/A ! CCPL HEADER START
7321N/A !
7321N/A ! This work is licensed under the Creative Commons
7321N/A ! Attribution-NonCommercial-NoDerivs 3.0 Unported License.
7321N/A ! To view a copy of this license, visit
7321N/A ! http://creativecommons.org/licenses/by-nc-nd/3.0/
7321N/A ! or send a letter to Creative Commons, 444 Castro Street,
7321N/A ! Suite 900, Mountain View, California, 94041, USA.
7321N/A !
7321N/A ! You can also obtain a copy of the license at
7321N/A ! trunk/opendj3/legal-notices/CC-BY-NC-ND.txt.
7321N/A ! See the License for the specific language governing permissions
7321N/A ! and limitations under the License.
7321N/A !
7321N/A ! If applicable, add the following below this CCPL HEADER, with the fields
7321N/A ! enclosed by brackets "[]" replaced with your own identifying information:
7321N/A ! Portions Copyright [yyyy] [name of copyright owner]
7321N/A !
7321N/A ! CCPL HEADER END
7321N/A !
7321N/A ! Copyright 2011-2014 ForgeRock AS
7321N/A !
7321N/A-->
7321N/A<refentry xml:id='encode-password-1'
7321N/A xmlns='http://docbook.org/ns/docbook'
7321N/A version='5.0' xml:lang='en'
7321N/A xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
7321N/A xsi:schemaLocation='http://docbook.org/ns/docbook
7321N/A http://docbook.org/xml/5.0/xsd/docbook.xsd'>
7321N/A <info><copyright><year>2011-2014</year><holder>ForgeRock AS</holder></copyright></info>
7321N/A <refmeta>
7321N/A <refentrytitle>encode-password</refentrytitle><manvolnum>1</manvolnum>
7321N/A <refmiscinfo class="software">OpenDJ</refmiscinfo>
7321N/A <refmiscinfo class="version"><?eval ${docTargetVersion}?></refmiscinfo>
7321N/A </refmeta>
7321N/A <refnamediv>
7321N/A <refname>encode-password</refname>
7321N/A <refpurpose>encode a password with an OpenDJ storage scheme</refpurpose>
7321N/A </refnamediv>
7321N/A <refsynopsisdiv>
7321N/A <cmdsynopsis>
7321N/A <command>encode-password</command>
7321N/A <arg choice="req">options</arg>
7321N/A </cmdsynopsis>
7321N/A </refsynopsisdiv>
7321N/A <refsect1>
7321N/A <title>Description</title>
7321N/A <para>This utility can be used to encode user passwords with a specified
7321N/A storage scheme, or to determine whether a given clear-text value matches a
7321N/A provided encoded password.</para>
7321N/A </refsect1>
7321N/A <refsect1>
7321N/A <title>Options</title>
7321N/A <para>The following global options are supported.</para>
7321N/A <variablelist>
7321N/A <varlistentry>
7321N/A <term><option>-a, --authPasswordSyntax</option></term>
7321N/A <listitem>
7321N/A <para>Use the authentication password syntax rather than the user
7321N/A password syntax.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-c, --clearPassword {clearPW}</option></term>
7321N/A <listitem>
7321N/A <para>Clear-text password to encode or to compare against an encoded
7321N/A password.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-e, --encodedPassword {encodedPW}</option></term>
7321N/A <listitem>
7321N/A <para>Encoded password to compare against the clear-text password.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-E, --encodedPasswordFile {file}</option></term>
7321N/A <listitem>
7321N/A <para>Encoded password file.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-f, --clearPasswordFile {file}</option></term>
7321N/A <listitem>
7321N/A <para>Clear-text password file.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-i, --interactivePassword</option></term>
7321N/A <listitem>
7321N/A <para>The password to encode or to compare against an encoded password is
7321N/A interactively asked to the user.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-l, --listSchemes</option></term>
7321N/A <listitem>
7321N/A <para>List available password storage schemes.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-r, --useCompareResultCode</option></term>
7321N/A <listitem>
7321N/A <para>Use the LDAP compare result as an exit code for the password
7321N/A comparison.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-s, --storageScheme {scheme}</option></term>
7321N/A <listitem>
7321N/A <para>Scheme to use for the encoded password.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-V, --version</option></term>
7321N/A <listitem>
7321N/A <para>Display version information.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-?, -H, --help</option></term>
7321N/A <listitem>
7321N/A <para>Display usage information.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A </variablelist>
7321N/A </refsect1>
7321N/A <refsect1>
7321N/A <title>Exit Codes</title>
7321N/A <variablelist>
7321N/A <varlistentry>
7321N/A <term>0</term>
7321N/A <listitem>
7321N/A <para>The command completed successfully.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term>5</term>
7321N/A <listitem>
7321N/A <para>The <option>-r</option> option was used, and the compare did not
7321N/A match.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term>6</term>
7321N/A <listitem>
7321N/A <para>The <option>-r</option> option was used, and the compare did
7321N/A match.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term>other</term>
7321N/A <listitem>
7321N/A <para>An error occurred.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A </variablelist>
7321N/A </refsect1>
7321N/A <refsect1>
7321N/A <title>Examples</title>
7321N/A <para>The following example encodes a password, and also shows comparison
7321N/A of a password with the encoded value.</para>
7321N/A
7321N/A <screen>
7321N/A$ <userinput>encode-password -l</userinput>
7321N/A<computeroutput>3DES
7321N/AAES
7321N/ABASE64
7321N/ABLOWFISH
7321N/ACLEAR
7321N/ACRYPT
7321N/AMD5
7321N/ARC4
7321N/ASHA
7321N/ASMD5
7321N/ASSHA
7321N/ASSHA256
7321N/ASSHA384
7321N/ASSHA512</computeroutput>
7321N/A
7321N/A$ <userinput>encode-password -c secret12 -s CRYPT</userinput>
7321N/A<computeroutput>Encoded Password: "{CRYPT}ZulJ6Dy3TFnrE"</computeroutput>
7321N/A
7321N/A$ <userinput>encode-password -c secret12 -s CRYPT -e "{CRYPT}ZulJ6Dy3TFnrE" -r</userinput>
7321N/A<computeroutput>The provided clear-text and encoded passwords match</computeroutput>
7321N/A
7321N/A$ <userinput>echo $?</userinput>
7321N/A<computeroutput>6</computeroutput>
7321N/A </screen>
7321N/A </refsect1>
7321N/A</refentry>