6330N/A<?xml version="1.0" encoding="UTF-8"?>
6330N/A<!--
6330N/A ! CCPL HEADER START
6330N/A !
6330N/A ! This work is licensed under the Creative Commons
6330N/A ! Attribution-NonCommercial-NoDerivs 3.0 Unported License.
6330N/A ! To view a copy of this license, visit
6330N/A ! http://creativecommons.org/licenses/by-nc-nd/3.0/
6330N/A ! or send a letter to Creative Commons, 444 Castro Street,
6330N/A ! Suite 900, Mountain View, California, 94041, USA.
6330N/A !
6330N/A ! You can also obtain a copy of the license at
6330N/A ! trunk/opendj3/legal-notices/CC-BY-NC-ND.txt.
6330N/A ! See the License for the specific language governing permissions
6330N/A ! and limitations under the License.
6330N/A !
6330N/A ! If applicable, add the following below this CCPL HEADER, with the fields
6330N/A ! enclosed by brackets "[]" replaced with your own identifying information:
6330N/A ! Portions Copyright [yyyy] [name of copyright owner]
6330N/A !
6330N/A ! CCPL HEADER END
6330N/A !
6330N/A ! Copyright 2011-2012 ForgeRock AS
6330N/A ! Portions Copyright 2013 Jens Elkner
6330N/A !
6330N/A-->
6330N/A<refentry xml:id="encode-password-1" xmlns="http://docbook.org/ns/docbook"
6330N/A version="5.0" xml:lang="en"
6330N/A xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6330N/A xsi:schemaLocation="http://docbook.org/ns/docbook http://docbook.org/xml/5.0/xsd/docbook.xsd"
6330N/A xmlns:xlink="http://www.w3.org/1999/xlink"
6330N/A xmlns:xi="http://www.w3.org/2001/XInclude">
6330N/A <xi:include href="common.xml" xpointer='xpointer(//info[@name="info"])'/>
6330N/A <refmeta>
6330N/A <refentrytitle><application>encode-password</application></refentrytitle>
6330N/A <xi:include href="common.xml" xpointer='xpointer(//manvolnum[@name="v1m"])'/>
6330N/A </refmeta>
6330N/A <refnamediv>
6330N/A <refname><application>encode-password</application></refname>
6330N/A <refpurpose>encode a password with an OpenDJ storage scheme</refpurpose>
6330N/A </refnamediv>
6330N/A <refsynopsisdiv>
6330N/A <cmdsynopsis>
6330N/A <command>encode-password</command>
6330N/A <arg>-a</arg>
6330N/A <arg>-c <replaceable class="parameter">clearPw</replaceable></arg>
6330N/A <arg>-e <replaceable class="parameter">encPw</replaceable></arg>
6330N/A <arg>-E <replaceable class="parameter">encPwFile</replaceable></arg>
6331N/A <arg>-f <replaceable class="parameter">clearPwFile</replaceable></arg>
6330N/A <arg>-i</arg>
6330N/A <arg>-l</arg>
6330N/A <arg>-r</arg>
6330N/A <arg>-s <replaceable class="parameter">scheme</replaceable></arg>
6330N/A <xi:include href="common.xml"
6330N/A xpointer='xpointer(//para[@name="s-general"]/*)'/>
6330N/A </cmdsynopsis>
6330N/A </refsynopsisdiv>
6330N/A <refsection>
6330N/A <title>Description</title>
6330N/A <para>
6330N/AThis utility can be used to encode user passwords with a specified storage
6330N/Ascheme, or to determine whether a given clear-text value matches a provided
6330N/Aencoded password.
6330N/A </para>
6330N/A </refsection>
6330N/A <refsection>
6330N/A <title>Options</title>
6330N/A <para>
6330N/AThe following global options are supported.
6330N/A </para>
6330N/A <variablelist>
6330N/A <varlistentry>
6330N/A <term><option>-a, --authPasswordSyntax</option></term>
6330N/A <listitem>
6330N/A <para>
6330N/AUse the authentication password syntax rather than the user password syntax.
6330N/A </para>
6330N/A </listitem>
6330N/A </varlistentry>
6330N/A <varlistentry>
6330N/A <term><option>-c, --clearPassword</option> <replaceable
6330N/A class="parameter">password</replaceable></term>
6330N/A <listitem>
6330N/A <para>
6330N/AClear-text password to encode or to compare against an encoded password.
6330N/A </para>
6330N/A </listitem>
6330N/A </varlistentry>
6330N/A <varlistentry>
6330N/A <term><option>-e, --encodedPassword</option> <replaceable
6330N/A class="parameter">password</replaceable></term>
6330N/A <listitem>
6330N/A <para>
6330N/AEncoded password to compare against the clear-text password.
6330N/A </para>
6330N/A </listitem>
6330N/A </varlistentry>
6330N/A <varlistentry>
6330N/A <term><option>-E, --encodedPasswordFile</option> <replaceable
6330N/A class="parameter">file</replaceable></term>
6330N/A <listitem>
6330N/A <para>
6330N/AFile which contains the encoded password.
6330N/A </para>
6330N/A </listitem>
6330N/A </varlistentry>
6330N/A <varlistentry>
6330N/A <term><option>-f, --clearPasswordFile</option> <replaceable
6330N/A class="parameter">file</replaceable></term>
6330N/A <listitem>
6330N/A <para>
6330N/AFile which contains the clear-text password.</para>
6330N/A </listitem>
6330N/A </varlistentry>
6330N/A <varlistentry>
6330N/A <term><option>-i, --interactivePassword</option></term>
6330N/A <listitem>
6330N/A <para>
6330N/AThe password to encode or to compare against an encoded password is
6330N/Ainteractively asked to the user.
6330N/A </para>
6330N/A </listitem>
6330N/A </varlistentry>
6330N/A <varlistentry>
6330N/A <term><option>-l, --listSchemes</option></term>
6330N/A <listitem>
6330N/A <para>
6330N/AList available password storage schemes.
6330N/A </para>
6330N/A </listitem>
6330N/A </varlistentry>
6330N/A <varlistentry>
6330N/A <term><option>-r, --useCompareResultCode</option></term>
6330N/A <listitem>
6330N/A <para>
6330N/AUse the LDAP compare result as an exit code for the password comparison.
6330N/A </para>
6330N/A </listitem>
6330N/A </varlistentry>
6330N/A <varlistentry>
6330N/A <term><option>-s, --storageScheme</option> <replaceable
6330N/A class="parameter">scheme</replaceable></term>
6330N/A <listitem>
6330N/A <para>
6330N/AScheme to use for the encoded password.
6330N/A </para>
6330N/A </listitem>
6330N/A </varlistentry>
6330N/A <xi:include href="common.xml"
6330N/A xpointer='xpointer(//para[@name="l-general"]/*)'/>
6330N/A </variablelist>
6330N/A </refsection>
6330N/A <refsection>
6330N/A <title>Examples</title>
6330N/A <informalexample>
6330N/A <para>
6330N/AThe following example encodes a password, and also shows comparison of a
6330N/Apassword with the encoded value.
6330N/A </para>
6330N/A <literallayout
6330N/A><prompt>$ </prompt><command>encode-password -l</command></literallayout>
6330N/A <screen>
6330N/A3DES
6330N/AAES
6330N/ABASE64
6330N/ABLOWFISH
6330N/ACLEAR
6330N/ACRYPT
6330N/AMD5
6330N/ARC4
6330N/ASHA
6330N/ASMD5
6330N/ASSHA
6330N/ASSHA256
6330N/ASSHA384
6330N/ASSHA512
6330N/A</screen>
6330N/A <literallayout><prompt
6330N/A>$ </prompt><command>encode-password -c secret12 -s CRYPT</command></literallayout>
6330N/A <screen>
6330N/AEncoded Password: "{CRYPT}ZulJ6Dy3TFnrE"
6330N/A</screen>
6330N/A <literallayout><prompt
6330N/A>$ </prompt><command>encode-password -c secret12 -s CRYPT \
6330N/A -e "{CRYPT}ZulJ6Dy3TFnrE" -r</command></literallayout>
6330N/A <screen>
6330N/AThe provided clear-text and encoded passwords match
6330N/A</screen>
6330N/A <literallayout><prompt
6330N/A>$ </prompt><command>echo $?</command></literallayout>
6330N/A <screen>
6330N/A6
6330N/A</screen>
6330N/A </informalexample>
6330N/A </refsection>
6330N/A <refsection>
6330N/A <title>Exit Codes</title>
6330N/A <variablelist>
6330N/A <varlistentry>
6330N/A <term><errorcode>0</errorcode></term>
6330N/A <listitem>
6330N/A <para>
6330N/AThe command completed successfully.
6330N/A </para>
6330N/A </listitem>
6330N/A </varlistentry>
6330N/A <varlistentry>
6330N/A <term><errorcode>5</errorcode></term>
6330N/A <listitem>
6330N/A <para>
6330N/AThe <option>-r</option> option was used, and the compare did not match.
6330N/A </para>
6330N/A </listitem>
6330N/A </varlistentry>
6330N/A <varlistentry>
6330N/A <term><errorcode>6</errorcode></term>
6330N/A <listitem>
6330N/A <para>
6330N/AThe <option>-r</option> option was used, and the compare did match.
6330N/A </para>
6330N/A </listitem>
6330N/A </varlistentry>
6330N/A <varlistentry>
6330N/A <term><errorcode>other</errorcode></term>
6330N/A <listitem>
6330N/A <para>
6330N/AAn error occurred.
6330N/A </para>
6330N/A </listitem>
6330N/A </varlistentry>
6330N/A </variablelist>
6330N/A </refsection>
6330N/A <xi:include href="common.xml" xpointer='xpointer(//refsection[@name="seeAlso"])'/>
6330N/A</refentry>