<?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
! trunk/opendj3/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-2012 ForgeRock AS
! Portions Copyright 2013 Jens Elkner
!
-->
<refentry xml:id="manage-account-1" 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"
xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="common.xml" xpointer='xpointer(//info[@name="info"])'/>
<refmeta>
<refentrytitle><application>manage-account</application></refentrytitle>
<xi:include href="common.xml" xpointer='xpointer(//manvolnum[@name="v1m"])'/>
</refmeta>
<refnamediv>
<refname><application>manage-account</application></refname>
<refpurpose>manage state of directory server accounts</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>manage-account</command>
<arg choice="plain"><replaceable>subcommand</replaceable></arg>
<arg>subcommand_opts</arg>
<arg>-b <replaceable class="parameter">targetDN</replaceable></arg>
<sbr/><sbr/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-remote"]/*[not(@name="sc-contimeout")])'/>
<sbr/><sbr/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-auth"]/*)'/>
<sbr/><sbr/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-misc"]/*[@name="sc-verbose"])'/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-general"]/*)'/>
</cmdsynopsis>
</refsynopsisdiv>
<refsection>
<title>Description</title>
<para>
This utility can be used to retrieve and manipulate the values of password
policy state variables.
</para>
</refsection>
<refsection>
<title>Subcommands</title>
<para>The following subcommands are supported.</para>
<!-- Generated - for more info see man-dsconfig.xml
$ setenv FNAME scmd-manage-account.xml
$ print '<?xml version="1.0" encoding="UTF-8"?>\n<refentry>' >$FNAME
$ ksh $PROTO/opt/opendj25/bin/manage-account '-?' >>$FNAME
$ print '</refentry>' >>$FNAME
-->
<xi:include href="scmd-manage-account.xml" xpointer='xpointer(/refentry/*)'/>
</refsection>
<refsection>
<title>Global Options</title>
<para>The following global options are supported.</para>
<variablelist>
<varlistentry>
<term><option>-b, --targetDN</option> <replaceable
class="parameter">targetDN</replaceable></term>
<listitem>
<para>
The DN of the user entry for which to get and set password policy state
information.
</para>
</listitem>
</varlistentry>
</variablelist>
<refsection>
<title>LDAP Connection Options</title>
<variablelist>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-remote"]/*[not(@name="lc-contimeout")])'/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-auth"]/*)'/>
</variablelist>
</refsection>
<refsection>
<title>Utility Input/Output Options</title>
<variablelist>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-misc"]/*[@name="lc-verbose"])'/>
</variablelist>
</refsection>
<refsection>
<title>General Options</title>
<variablelist>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-general"]/*)'/>
</variablelist>
</refsection>
</refsection>
<refsection>
<title>Examples</title>
<para>
For the following examples, the directory admin user, Kirsten Vaughan, has
<literal>ds-privilege-name: password-reset</literal>, and the following ACI on
<literal>ou=People,dc=example,dc=com</literal>.
</para>
<programlisting>
(target="ldap:///ou=People,dc=example,dc=com") (targetattr ="*||+")(
version 3.0;acl "Admins can run amok"; allow(all) groupdn =
"ldap:///cn=Directory Administrators,ou=Groups,dc=example,dc=com";)
</programlisting>
<informalexample>
<para>
The following command locks a user account.
</para>
<literallayout><prompt
>$ </prompt><command>manage-account set-account-is-disabled -O true -p 4444 -w bribery \
-D "uid=kvaughan,ou=people,dc=example,dc=com" \
-b uid=bjensen,ou=people,dc=example,dc=com -X</command></literallayout>
<screen>
Account Is Disabled: true
</screen>
</informalexample>
<informalexample>
<para>
The following command unlocks a user account.
</para>
<literallayout><prompt
>$ </prompt><command>manage-account clear-account-is-disabled -p 4444 -w bribery \
-D "uid=kvaughan,ou=people,dc=example,dc=com" \
-b uid=bjensen,ou=people,dc=example,dc=com -X</command></literallayout>
<screen>
Account Is Disabled: false
</screen>
</informalexample>
</refsection>
<xi:include href="common.xml" xpointer='xpointer(//refsection[@name="env"])'/>
<xi:include href="common.xml" xpointer='xpointer(//refsection[@name="exit-0-gt0"])'/>
<xi:include href="common.xml" xpointer='xpointer(//refsection[@name="seeAlso"])'/>
</refentry>