Attempt to make the PDF output easier to read, and eliminate need for width="80" on monospace verbatim blocks.
| | |
| | | --> |
| | | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> |
| | | |
| | | <xsl:import href="urn:docbkx:stylesheet"/> |
| | | <xsl:import href="urn:docbkx:stylesheet"/> |
| | | |
| | | <xsl:param name="paper.type">A4</xsl:param> |
| | | <xsl:param name="double.sided" select="1"></xsl:param> |
| | | <xsl:param name="fop1.extensions" select="1" /> |
| | | |
| | | <xsl:param name="fop1.extensions" select="1" /> |
| | | <xsl:param name="shade.verbatim" select="1" /> |
| | | <xsl:attribute-set name="shade.verbatim.style"> |
| | | <xsl:attribute name="background-color">#efefef</xsl:attribute> |
| | | <xsl:attribute name="border-width">0.5pt</xsl:attribute> |
| | | <xsl:attribute name="border-style">dashed</xsl:attribute> |
| | | <xsl:attribute name="border-color">#000000</xsl:attribute> |
| | | <xsl:attribute name="padding">3pt</xsl:attribute> |
| | | </xsl:attribute-set> |
| | | <xsl:param name="ulink.footnotes" select="1" /> |
| | | <xsl:param name="generate.toc"> |
| | | appendix nop |
| | | article/appendix nop |
| | | article nop |
| | | book toc,title |
| | | chapter nop |
| | | part toc,title |
| | | preface nop |
| | | qandadiv nop |
| | | qandaset nop |
| | | reference toc,title |
| | | sect1 nop |
| | | sect2 nop |
| | | sect3 nop |
| | | sect4 nop |
| | | sect5 nop |
| | | section nop |
| | | set toc,title |
| | | </xsl:param> |
| | | <xsl:param name="toc.max.depth">0</xsl:param> |
| | | |
| | | <xsl:param name="default.table.frame">topbot</xsl:param> |
| | | |
| | | <xsl:param name="variablelist.as.blocks" select="1"></xsl:param> |
| | | <xsl:param name="variablelist.term.separator"></xsl:param> |
| | | <xsl:param name="variablelist.term.break.after">0</xsl:param> |
| | | |
| | | <xsl:attribute-set name="monospace.properties"> |
| | | <xsl:attribute name="line-height">1em</xsl:attribute> |
| | | <xsl:attribute name="font-size"> |
| | | <xsl:choose> |
| | | <xsl:when test="ancestor::note |
| | | or ancestor::warning |
| | | or ancestor::important |
| | | or ancestor::caution |
| | | or ancestor::title |
| | | or ancestor::literal |
| | | or ancestor::filename">0.9em</xsl:when> |
| | | <xsl:otherwise>0.75em</xsl:otherwise> |
| | | </xsl:choose> |
| | | </xsl:attribute> |
| | | </xsl:attribute-set> |
| | | <xsl:param name="monospace.verbatim.font.width">0.60em</xsl:param> |
| | | <xsl:attribute-set name="monospace.verbatim.properties" |
| | | use-attribute-sets="verbatim.properties monospace.properties"> |
| | | <xsl:attribute name="text-align">start</xsl:attribute> |
| | | <xsl:attribute name="wrap-option">no-wrap</xsl:attribute> |
| | | </xsl:attribute-set> |
| | | <xsl:param name="shade.verbatim" select="1" /> |
| | | <xsl:attribute-set name="shade.verbatim.style"> |
| | | <xsl:attribute name="background-color">#fafafa</xsl:attribute> |
| | | <xsl:attribute name="border-width">0.5pt</xsl:attribute> |
| | | <xsl:attribute name="border-style">solid</xsl:attribute> |
| | | <xsl:attribute name="border-color">#e0eeee</xsl:attribute> |
| | | <xsl:attribute name="padding">3pt</xsl:attribute> |
| | | <xsl:attribute name="wrap-option">no-wrap</xsl:attribute> |
| | | </xsl:attribute-set> |
| | | <xsl:attribute-set name="verbatim.properties"> |
| | | <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> |
| | | <xsl:attribute name="space-before.optimum">1em</xsl:attribute> |
| | | <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> |
| | | <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute> |
| | | <xsl:attribute name="space-after.optimum">1em</xsl:attribute> |
| | | <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute> |
| | | <xsl:attribute name="hyphenate">false</xsl:attribute> |
| | | <xsl:attribute name="wrap-option">no-wrap</xsl:attribute> |
| | | <xsl:attribute name="white-space-collapse">false</xsl:attribute> |
| | | <xsl:attribute name="white-space-treatment">preserve</xsl:attribute> |
| | | <xsl:attribute name="linefeed-treatment">preserve</xsl:attribute> |
| | | <xsl:attribute name="text-align">start</xsl:attribute> |
| | | </xsl:attribute-set> |
| | | |
| | | <xsl:param name="ulink.footnotes" select="1" /> |
| | | |
| | | </xsl:stylesheet> |
| | |
| | | the server configuration, you must manually apply the changes to each |
| | | replica in a replication topology.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-password-policy-prop --policy-name "Default Password Policy" \ |
| | | > --set lockout-failure-count:3 --set lockout-duration:5m \ |
| | | > --set lockout-failure-expiration-interval:5m -X -n</screen> |
| | |
| | | <para>Users having the default password policy are then locked out after |
| | | three failed attempts in succession.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -p 1389 -D "uid=bjensen,ou=people,dc=example,dc=com" -w hifalutin \ |
| | | <screen>$ ldapsearch -p 1389 -D "uid=bjensen,ou=people,dc=example,dc=com" -w hifalutin \ |
| | | > -b dc=example,dc=com uid=bjensen mail |
| | | dn: uid=bjensen,ou=People,dc=example,dc=com |
| | | mail: bjensen@example.com |
| | |
| | | <para>Set the account status to disabled with the |
| | | <command>manage-account</command> command.</para> |
| | | |
| | | <screen width="80">$ manage-account -p 4444 -D "uid=kvaughan,ou=people,dc=example,dc=com" \ |
| | | <screen>$ manage-account -p 4444 -D "uid=kvaughan,ou=people,dc=example,dc=com" \ |
| | | > -w bribery set-account-is-disabled -O true \ |
| | | > -b uid=bjensen,ou=people,dc=example,dc=com -X |
| | | Account Is Disabled: true</screen> |
| | |
| | | <para>Clear the disabled status using the <command>manage-account</command> |
| | | command.</para> |
| | | |
| | | <screen width="80">$ manage-account -p 4444 -D "uid=kvaughan,ou=people,dc=example,dc=com" \ |
| | | <screen>$ manage-account -p 4444 -D "uid=kvaughan,ou=people,dc=example,dc=com" \ |
| | | > -w bribery clear-account-is-disabled \ |
| | | > -b uid=bjensen,ou=people,dc=example,dc=com -X |
| | | Account Is Disabled: false</screen> |
| | |
| | | <step> |
| | | <para>Set the base DN where <literal>uid</literal> should have unique |
| | | values, and enable the plugin.</para> |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-plugin-prop --plugin-name "UID Unique Attribute" \ |
| | | > --set base-dn:ou=people,dc=example,dc=com --set enabled:true -X -n</screen> |
| | | </step> |
| | | <step> |
| | | <para>Check that the plugin is working correctly.</para> |
| | | <screen width="80">$ cat bjensen.ldif |
| | | <screen>$ cat bjensen.ldif |
| | | dn: uid=ajensen,ou=People,dc=example,dc=com |
| | | changetype: modify |
| | | add: uid |
| | |
| | | </step> |
| | | <step> |
| | | <para>Set up the plugin configuration for your attribute.</para> |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > create-plugin --plugin-name "Unique mobile numbers" \ |
| | | > --type unique-attribute --set enabled:true \ |
| | | > --set base-dn:ou=people,dc=example,dc=com --set type:mobile -X -n</screen> |
| | | </step> |
| | | <step> |
| | | <para>Check that the plugin is working correctly.</para> |
| | | <screen width="80">$ cat mobile.ldif |
| | | <screen>$ cat mobile.ldif |
| | | dn: uid=ajensen,ou=People,dc=example,dc=com |
| | | changetype: modify |
| | | add: mobile |
| | |
| | | <step> |
| | | <para>Back up only the database for Example.com, where the data |
| | | is stored in the backend named <literal>userRoot</literal>.</para> |
| | | <screen width="80">$ backup -p 5444 -D "cn=Directory Manager" -w password \ |
| | | <screen>$ backup -p 5444 -D "cn=Directory Manager" -w password \ |
| | | > -n userRoot -d /path/to/OpenDJ/bak -t 0 |
| | | Backup task 20110613143715983 scheduled to start Jun 13, 2011 2:37:15 PM CEST</screen> |
| | | </step> |
| | | <step> |
| | | <para>Stop the server to back up Example.com data offline.</para> |
| | | <screen width="80">$ stop-ds |
| | | <screen>$ stop-ds |
| | | Stopping Server... |
| | | |
| | | [13/Jun/2011:14:31:00 +0200] category=BACKEND severity=NOTICE msgID=9896306 |
| | |
| | | </step> |
| | | <step> |
| | | <para>Back up all user data on the server.</para> |
| | | <screen width="80">$ backup -p 5444 -D "cn=Directory Manager" -w password \ |
| | | <screen>$ backup -p 5444 -D "cn=Directory Manager" -w password \ |
| | | > -a -d /path/to/OpenDJ/bak -t 0 |
| | | Backup task 20110613143801866 scheduled to start Jun 13, 2011 2:38:01 PM CEST</screen> |
| | | </step> |
| | |
| | | <step> |
| | | <para>Back up all user data every night at 2 AM, and notify |
| | | diradmin@example.com when finished, or on error.</para> |
| | | <screen width="80">$ backup -p 5444 -D "cn=Directory Manager" -w password -a \ |
| | | <screen>$ backup -p 5444 -D "cn=Directory Manager" -w password -a \ |
| | | > -d /path/to/OpenDJ/bak --recurringTask "00 02 * * *" \ |
| | | > --completionNotify diradmin@example.com --errorNotify diradmin@example.com |
| | | Recurring Backup task BackupTask-988d6adf-4d65-44bf-8546-6ea74a2480b0 |
| | |
| | | <stepalternatives> |
| | | <step> |
| | | <para>Stop the server to restore data for Example.com.</para> |
| | | <screen width="80">$ stop-ds |
| | | <screen>$ stop-ds |
| | | Stopping Server... |
| | | |
| | | [13/Jun/2011:15:44:06 +0200] category=BACKEND severity=NOTICE msgID=9896306 |
| | |
| | | </step> |
| | | <step> |
| | | <para>Schedule the restore as a task to begin immediately.</para> |
| | | <screen width="80">$ restore -p 5444 -D "cn=Directory Manager" -w password \ |
| | | <screen>$ restore -p 5444 -D "cn=Directory Manager" -w password \ |
| | | > -d /path/to/OpenDJ/bak -I 20110613080032 -t 0 |
| | | Restore task 20110613155052932 scheduled to start Jun 13, 2011 3:50:52 PM CEST</screen> |
| | | </step> |
| | |
| | | |
| | | <step> |
| | | <para>Prepare the replica to be restored.</para> |
| | | <screen width="80">$ dsreplication pre-external-initialization -I admin -w password -X -n \ |
| | | <screen>$ dsreplication pre-external-initialization -I admin -w password -X -n \ |
| | | > -p 5444 -b dc=example,dc=com |
| | | |
| | | Preparing base DN dc=example,dc=com to be initialized externally ..... Done. |
| | |
| | | </step> |
| | | <step> |
| | | <para>Restore the server database from the backup archive.</para> |
| | | <screen width="80">$ stop-ds |
| | | <screen>$ stop-ds |
| | | Stopping Server... |
| | | |
| | | [13/Jun/2011:15:44:06 +0200] category=BACKEND severity=NOTICE msgID=9896306 |
| | |
| | | </step> |
| | | <step> |
| | | <para>Reinitialize replication on the replica.</para> |
| | | <screen width="80">$ dsreplication post-external-initialization -I admin -w password -X -n \ |
| | | <screen>$ dsreplication post-external-initialization -I admin -w password -X -n \ |
| | | > -p 5444 -b dc=example,dc=com |
| | | |
| | | Updating replication information on base DN dc=example,dc=com ..... Done. |
| | |
| | | <para>To create a static group, add a group entry such as the following |
| | | to the directory.</para> |
| | | |
| | | <screen width="80">$ cat static.ldif |
| | | <screen>$ cat static.ldif |
| | | dn: cn=My Static Group,ou=Groups,dc=example,dc=com |
| | | cn: My Static Group |
| | | objectClass: groupOfUniqueNames |
| | |
| | | <para>To change group membership, modify the values of the membership |
| | | attribute.</para> |
| | | |
| | | <screen width="80">$ cat add2grp.ldif |
| | | <screen>$ cat add2grp.ldif |
| | | dn: cn=My Static Group,ou=Groups,dc=example,dc=com |
| | | changetype: modify |
| | | add: uniqueMember |
| | |
| | | <para>To create a dynamic group, add a group entry such as the following to |
| | | the directory.</para> |
| | | |
| | | <screen width="80">$ cat dynamic.ldif |
| | | <screen>$ cat dynamic.ldif |
| | | dn: cn=My Dynamic Group,ou=Groups,dc=example,dc=com |
| | | cn: My Dynamic Group |
| | | objectClass: top |
| | |
| | | <para>Group membership changes dynamically as entries change to match the |
| | | <literal>memberURL</literal> values.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -p 1389 -b dc=example,dc=com "(&(uid=*jensen) |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com "(&(uid=*jensen) |
| | | (isMemberOf=cn=My Dynamic Group,ou=Groups,dc=example,dc=com))" mail |
| | | dn: uid=bjensen,ou=People,dc=example,dc=com |
| | | mail: bjensen@example.com |
| | |
| | | <literal>Virtual Static member</literal> or |
| | | <literal>Virtual Static uniqueMember</literal> property.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-virtual-attribute-prop --name "Virtual Static member" \ |
| | | > --set allow-retrieving-membership:true -X -n</screen> |
| | | |
| | | <para>The following example creates a virtual static group, and reads the |
| | | group entry with all members.</para> |
| | | |
| | | <screen width="80">$ cat virtual.ldif |
| | | <screen>$ cat virtual.ldif |
| | | dn: cn=Virtual Static,ou=Groups,dc=example,dc=com |
| | | cn: Virtual Static |
| | | objectclass: top |
| | |
| | | <para>OpenDJ lets you look up which groups a user belongs to by using the |
| | | <literal>isMemberOf</literal> attribute.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -p 1389 -b dc=example,dc=com uid=bjensen isMemberOf |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com uid=bjensen isMemberOf |
| | | dn: uid=bjensen,ou=People,dc=example,dc=com |
| | | isMemberOf: cn=My Static Group,ou=Groups,dc=example,dc=com |
| | | isMemberOf: cn=Virtual Static,ou=Groups,dc=example,dc=com |
| | |
| | | referential integrity plugin is disabled by default. To enable the plugin, |
| | | use the <command>dsconfig</command> command.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-plugin-prop --plugin-name "Referential Integrity" --set enabled:true -X -n</screen> |
| | | |
| | | <para>With the plugin enabled, you can see OpenDJ referential integrity |
| | | resolving group membership automatically.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -p 1389 -b dc=example,dc=com "(cn=My Static Group)" |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com "(cn=My Static Group)" |
| | | dn: cn=My Static Group,ou=Groups,dc=example,dc=com |
| | | ou: Groups |
| | | objectClass: groupOfUniqueNames |
| | |
| | | <step> |
| | | <para>Run the <command>make-ldif</command> command to generate your |
| | | LDIF file.</para> |
| | | <screen width="80">$ make-ldif --randomSeed 0 -t /path/to/my.template \ |
| | | <screen>$ make-ldif --randomSeed 0 -t /path/to/my.template \ |
| | | > -o generated.ldif |
| | | Processed 1000 entries |
| | | Processed 2000 entries |
| | |
| | | <para>To speed up the operation for large data sets such as importing |
| | | millions of entries, first shut down the server where you plan to import |
| | | data.</para> |
| | | <screen width='80'>$ stop-ds</screen> |
| | | <screen>$ stop-ds</screen> |
| | | </step> |
| | | <step performance="optional"> |
| | | <para>Create a new JE backend for your data if you do not want to use |
| | | an existing backend, such as <literal>userRoot</literal>, and set the |
| | | base DN corresponding to your data.</para> |
| | | <screen width='80'>$ dsconfig create-backend --backend-name testData --type local-db |
| | | <screen>$ dsconfig create-backend --backend-name testData --type local-db |
| | | |
| | | |
| | | >>>> Configuring the "base-dn" property |
| | |
| | | <stepalternatives> |
| | | <step> |
| | | <para>If you stopped the server, import the data directly.</para> |
| | | <screen width='80'>$ import-ldif -b dc=example,dc=org -n userRoot -l /path/to/generated.ldif</screen> |
| | | <screen>$ import-ldif -b dc=example,dc=org -n userRoot -l /path/to/generated.ldif</screen> |
| | | </step> |
| | | <step> |
| | | <para>If not, schedule a task to import the data while online.</para> |
| | | <screen width='80'>$ import-ldif -X -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ import-ldif -X -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > -b dc=example,dc=org -n userRoot -l /path/to/generated.ldif</screen> |
| | | <para>Notice that the task is scheduled through communication over SSL on |
| | | the administration port, by default <literal>4444</literal>. You can |
| | |
| | | <step performance="optional"> |
| | | <para>To speed up the operation for large data sets such as exporting |
| | | millions of entries, first shut down the server.</para> |
| | | <screen width='80'>$ stop-ds</screen> |
| | | <screen>$ stop-ds</screen> |
| | | </step> |
| | | <step> |
| | | <para>The following example exports <literal>dc=example,dc=org</literal> |
| | |
| | | <stepalternatives> |
| | | <step> |
| | | <para>If you stopped the server, export the data directly.</para> |
| | | <screen width='80'>$ export-ldif -b dc=example,dc=org -n userRoot -l /path/to/backup.ldif</screen> |
| | | <screen>$ export-ldif -b dc=example,dc=org -n userRoot -l /path/to/backup.ldif</screen> |
| | | </step> |
| | | <step> |
| | | <para>If not, schedule a task to export the data while online.</para> |
| | |
| | | in a similar way to how you search LDAP directories with the |
| | | <command>ldapsearch</command> command.</para> |
| | | |
| | | <screen width="80">$ ldifsearch -b dc=example,dc=org -l generated.ldif "(sn=Grenier)" mobile |
| | | <screen>$ ldifsearch -b dc=example,dc=org -l generated.ldif "(sn=Grenier)" mobile |
| | | dn: uid=user.4630,ou=People,dc=example,dc=org |
| | | mobile: +1 728 983 6669 |
| | | |
| | |
| | | <para>The <command>ldifmodify</command> command lets you apply changes to |
| | | LDIF files, generating a new, changed version of the original file.</para> |
| | | |
| | | <screen width="80">$ cat changes.ldif |
| | | <screen>$ cat changes.ldif |
| | | dn: uid=user.0,ou=People,dc=example,dc=org |
| | | changetype: modify |
| | | replace: description |
| | |
| | | <para>The <command>ldif-diff</command> command reports differences between |
| | | two LDIF files in LDIF format.</para> |
| | | |
| | | <screen width="80">$ ldif-diff -s old.ldif -t new.ldif |
| | | <screen>$ ldif-diff -s old.ldif -t new.ldif |
| | | dn: uid=user.0,ou=People,dc=example,dc=org |
| | | changetype: modify |
| | | add: initials |
| | |
| | | allows clients to find people even when they misspell names as in the |
| | | following example.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -b dc=example,dc=com "(cn~=Babs Jansen)" cn |
| | | <screen>$ ldapsearch -b dc=example,dc=com "(cn~=Babs Jansen)" cn |
| | | dn: uid=bjensen,ou=People,dc=example,dc=com |
| | | cn: Barbara Jensen |
| | | cn: Babs Jensen</screen> |
| | |
| | | the search filter. An equality index requires clients to match values |
| | | without wildcards or misspellings.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -b dc=example,dc=com "(uid=bjensen)" mail |
| | | <screen>$ ldapsearch -b dc=example,dc=com "(uid=bjensen)" mail |
| | | dn: uid=bjensen,ou=People,dc=example,dc=com |
| | | mail: bjensen@example.com</screen> |
| | | </section> |
| | |
| | | |
| | | <para>The following example shows a search that specifies ranges.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -b dc=example,dc=com \ |
| | | <screen>$ ldapsearch -b dc=example,dc=com \ |
| | | > "(&(uidNumber>=1120)(roomNumber>=4500))" uid |
| | | dn: uid=charvey,ou=People,dc=example,dc=com |
| | | uid: charvey |
| | |
| | | attribute is indexed for presence by default to allow quick retrieval |
| | | of entries with ACIs.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -b dc=example,dc=com "(aci=*)" - |
| | | <screen>$ ldapsearch -b dc=example,dc=com "(aci=*)" - |
| | | dn: dc=example,dc=com |
| | | |
| | | dn: ou=People,dc=example,dc=com</screen> |
| | |
| | | in the filter. Substring indexes can be expensive to maintain, especially |
| | | for large attribute values.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -b dc=example,dc=com "(cn=Barb*)" cn |
| | | <screen>$ ldapsearch -b dc=example,dc=com "(cn=Barb*)" cn |
| | | dn: uid=bfrancis,ou=People,dc=example,dc=com |
| | | cn: Barbara Francis |
| | | |
| | |
| | | <para>The following example creates a new substring index for |
| | | <literal>description</literal>.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > create-local-db-index --backend-name userRoot --index-name description |
| | | > --set index-type:substring -n</screen> |
| | | </example> |
| | |
| | | <para>The following example configures and approximate index for |
| | | <literal>cn</literal> (common name).</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-local-db-index-prop --backend-name userRoot --index-name cn \ |
| | | > --set index-type:approximate -n</screen> |
| | | </example> |
| | |
| | | <literal>objectClass</literal> index, and then rebuilds the index for the |
| | | configuration change to take effect.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-local-db-index-prop --backend-name userRoot --index-name objectClass \ |
| | | > --set index-entry-limit:5000 -n |
| | | $ rebuild-index -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | |
| | | <para>The following example verifies the <literal>cn</literal> (common |
| | | name) index for completeness and for errors.</para> |
| | | |
| | | <screen width="80">$ verify-index -b dc=example,dc=com -i cn --clean --countErrors |
| | | <screen>$ verify-index -b dc=example,dc=com -i cn --clean --countErrors |
| | | [07/Jun/2011:16:06:50 +0200] category=BACKEND severity=INFORMATION |
| | | msgID=9437595 msg=Local DB backend userRoot does not specify the number of |
| | | lock tables: defaulting to 97 |
| | |
| | | <para>When you first install OpenDJ directory server and import your |
| | | data from LDIF, the following indexes are configured.</para> |
| | | |
| | | <table frame="topbot" rowheader="firstcol"> |
| | | <table rowheader="firstcol"> |
| | | <title>Default Indexes</title> |
| | | <tgroup cols="7" rowsep="1"> |
| | | <tgroup cols="7"> |
| | | <colspec colnum="2" colname="c2" /> |
| | | <colspec colnum="7" colname="c7" /> |
| | | <thead> |
| | |
| | | visiting the <literal>GNB00</literal> office and are looking for a |
| | | printer.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -b ou=Printers,dc=example,dc=com "(printerLocation=GNB00)"</screen> |
| | | <screen>$ ldapsearch -b ou=Printers,dc=example,dc=com "(printerLocation=GNB00)"</screen> |
| | | |
| | | <para>In the example, the LDAP filter indicates to the directory that you |
| | | want to lookup printer entries where the <literal>printerLocation</literal> |
| | |
| | | <para>The following example searches for entries with UID containing |
| | | <literal>jensen</literal>, returning only DNs and uid values.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -p 1389 -b dc=example,dc=com "(uid=*jensen*)" uid |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com "(uid=*jensen*)" uid |
| | | dn: uid=ajensen,ou=People,dc=example,dc=com |
| | | uid: ajensen |
| | | |
| | |
| | | command returns the attributes associated with the <literal>person</literal> |
| | | object class.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -p 1389 -b ou=people,dc=example,dc=com \ |
| | | <screen>$ ldapsearch -p 1389 -b ou=people,dc=example,dc=com \ |
| | | > "(&(uid=*jensen*)(l=Santa Clara))" @person |
| | | dn: uid=ajensen,ou=People,dc=example,dc=com |
| | | objectClass: person |
| | |
| | | <para>In this example, Kirsten Vaughan checks whether the hashed password |
| | | value matches the stored value on <literal>authPassword</literal>.</para> |
| | | |
| | | <screen width="80">$ ldapcompare -p 1389 -D "uid=kvaughan,ou=people,dc=example,dc=com" \ |
| | | <screen>$ ldapcompare -p 1389 -D "uid=kvaughan,ou=people,dc=example,dc=com" \ |
| | | > -w bribery 'authPassword:MD5$dFHgpDxXUT8=$qlC4xMXvmVlusJLz9/WJ5Q==' \ |
| | | > uid=kvaughan,ou=people,dc=example,dc=com |
| | | Comparing type authPassword with value |
| | |
| | | <example> |
| | | <title>Add: Two New Users</title> |
| | | |
| | | <screen width="80">$ cat new-users.ldif |
| | | <screen>$ cat new-users.ldif |
| | | dn: cn=Arsene Lupin,ou=Special Users,dc=example,dc=com |
| | | objectClass: person |
| | | objectClass: top |
| | |
| | | <para>The following example adds a description and JPEG photo to Sam |
| | | Carter's entry.</para> |
| | | |
| | | <screen width="80">$ cat scarter-mods.ldif |
| | | <screen>$ cat scarter-mods.ldif |
| | | dn: uid=scarter,ou=people,dc=example,dc=com |
| | | changetype: modify |
| | | add: description |
| | |
| | | <para>The following example replaces the description on Sam Carter's |
| | | entry.</para> |
| | | |
| | | <screen width="80">$ cat scarter-newdesc.ldif |
| | | <screen>$ cat scarter-newdesc.ldif |
| | | dn: uid=scarter,ou=people,dc=example,dc=com |
| | | changetype: modify |
| | | replace: description |
| | |
| | | <para>The following example deletes the JPEG photo on Sam Carter's |
| | | entry.</para> |
| | | |
| | | <screen width="80">$ cat /path/to/scarter-deljpeg.ldif |
| | | <screen>$ cat /path/to/scarter-deljpeg.ldif |
| | | dn: uid=scarter,ou=people,dc=example,dc=com |
| | | changetype: modify |
| | | delete: jpegphoto |
| | |
| | | The following example renames and changes Sam Carter's entry |
| | | accordingly.</para> |
| | | |
| | | <screen width="80">$ cat /path/to/scarter-sjensen.ldif |
| | | <screen>$ cat /path/to/scarter-sjensen.ldif |
| | | dn: uid=scarter,ou=people,dc=example,dc=com |
| | | changetype: modrdn |
| | | newrdn: uid=sjensen |
| | |
| | | removing the empty <literal>ou=Employees,dc=example,dc=com</literal> |
| | | container.</para> |
| | | |
| | | <screen width="80">$ cat move-customers.ldif |
| | | <screen>$ cat move-customers.ldif |
| | | dn: ou=Customers,dc=example,dc=com |
| | | changetype: modrdn |
| | | newrdn: ou=People |
| | |
| | | <para>The following example uses the subtree delete option to remove |
| | | all Special Users from the directory.</para> |
| | | |
| | | <screen width="80">$ ldapdelete -p 1389 -D "cn=Directory Manager" -w password \ |
| | | <screen>$ ldapdelete -p 1389 -D "cn=Directory Manager" -w password \ |
| | | > -x "ou=Special Users,dc=example,dc=com" |
| | | Processing DELETE request for ou=Special Users,dc=example,dc=com |
| | | DELETE operation successful for DN ou=Special Users,dc=example,dc=com</screen> |
| | |
| | | password. The <option>-q</option> option means the same thing as |
| | | <option>--useStartTLS</option>.</para> |
| | | |
| | | <screen width="80">$ ldappasswordmodify -q -p 1389 -D "uid=kvaughan,ou=people,dc=example,dc=com" \ |
| | | <screen>$ ldappasswordmodify -q -p 1389 -D "uid=kvaughan,ou=people,dc=example,dc=com" \ |
| | | > -w bribery -a "dn:uid=scarter,ou=people,dc=example,dc=com" -n ChangeMe |
| | | The LDAP password modify operation was successful</screen> |
| | | |
| | |
| | | but <command>set-password-is-reset</command> is a hidden option, supported |
| | | only for testing.</para> |
| | | |
| | | <screen width="80">$ manage-account -D "cn=Directory Manager" -w password \ |
| | | <screen>$ manage-account -D "cn=Directory Manager" -w password \ |
| | | > set-password-is-reset -b uid=scarter,ou=people,dc=example,dc=com -O true |
| | | Password Is Reset: true</screen> |
| | | </example> |
| | |
| | | <step> |
| | | <para>Change the port number using the <command>dsconfig</command> |
| | | command.</para> |
| | | <screen width="80">$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password \ |
| | | > set-connection-handler-prop --handler-name "LDAP Connection Handler" \ |
| | | > --set listen-port:11389 -n</screen> |
| | | <para>This example changes the port number to 11389 in the configuration.</para> |
| | | </step> |
| | | <step> |
| | | <para>Restart the server so the change takes effect.</para> |
| | | <screen width="80">$ stop-ds --restart</screen> |
| | | <screen>$ stop-ds --restart</screen> |
| | | </step> |
| | | </procedure> |
| | | </section> |
| | |
| | | <step> |
| | | <para>Generate the server certificate using the Java |
| | | <command>keytool</command> command.</para> |
| | | <screen width="80">$ keytool -genkey -alias server-cert -keyalg rsa \ |
| | | <screen>$ keytool -genkey -alias server-cert -keyalg rsa \ |
| | | > -dname "CN=mark-laptop,O=Example Corp,C=FR" \ |
| | | > -keystore OpenDJ/config/keystore -storepass changeit -keypass changeit</screen> |
| | | <para>In this example, OpenDJ is running on a system with hostname |
| | |
| | | </step> |
| | | <step> |
| | | <para>Self-sign the server certificate.</para> |
| | | <screen width="80">$ keytool -selfcert -alias server-cert -keystore \ |
| | | <screen>$ keytool -selfcert -alias server-cert -keystore \ |
| | | > OpenDJ/config/keystore -storepass changeit</screen> |
| | | </step> |
| | | <step> |
| | | <para>Configure the File Based Key Manager Provider for JKS to use the |
| | | filename and key store PIN that you set up with the |
| | | <command>keytool</command> command.</para> |
| | | <screen width="80">$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password -X \ |
| | | <screen>$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password -X \ |
| | | > set-key-manager-provider-prop --provider-name JKS \ |
| | | > --set enabled:true --set key-store-pin:changeit \ |
| | | > --remove key-store-pin-file:config/keystore.pin -n</screen> |
| | |
| | | <step> |
| | | <para>Configure the File Based Trust Manager Provider for JKS to use the |
| | | key store and PIN as well.</para> |
| | | <screen width="80">$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password -X \ |
| | | <screen>$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password -X \ |
| | | > set-trust-manager-provider-prop --provider-name JKS \ |
| | | > --set enabled:true --set trust-store-file:config/keystore \ |
| | | > --set trust-store-pin:changeit -n</screen> |
| | |
| | | </step> |
| | | <step> |
| | | <para>Activate StartTLS on the current LDAP port.</para> |
| | | <screen width="80">$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password \ |
| | | > set-connection-handler-prop --handler-name "LDAP Connection Handler" \ |
| | | > --set allow-start-tls:true -n</screen> |
| | | <para>The change takes effect. No need to restart the server.</para> |
| | |
| | | </step> |
| | | <step> |
| | | <para>Configure the server to activate LDAPS access.</para> |
| | | <screen width="80">$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password \ |
| | | > set-connection-handler-prop --handler-name "LDAPS Connection Handler" \ |
| | | > --set listen-port:1636 --set enabled:true --set use-ssl:true -n</screen> |
| | | <para>This example changes the port number to 1636 in the configuration.</para> |
| | |
| | | <step> |
| | | <para>Change the port number using the <command>dsconfig</command> |
| | | command.</para> |
| | | <screen width="80">$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password \ |
| | | > set-connection-handler-prop --handler-name "LDAPS Connection Handler" \ |
| | | > --set listen-port:11636 -n</screen> |
| | | <para>This example changes the port number to 11636 in the configuration.</para> |
| | | </step> |
| | | <step> |
| | | <para>Restart the server so the change takes effect.</para> |
| | | <screen width="80">$ stop-ds --restart</screen> |
| | | <screen>$ stop-ds --restart</screen> |
| | | </step> |
| | | </procedure> |
| | | </section> |
| | |
| | | |
| | | <step> |
| | | <para>Configure the server to activate JMX access.</para> |
| | | <screen width="80">$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password \ |
| | | > set-connection-handler-prop --handler-name "JMX Connection Handler" \ |
| | | > --set enabled:true -n</screen> |
| | | <para>This example uses the default port number, 1689.</para> |
| | | </step> |
| | | <step> |
| | | <para>Restart the server so the change takes effect.</para> |
| | | <screen width="80">$ stop-ds --restart</screen> |
| | | <screen>$ stop-ds --restart</screen> |
| | | </step> |
| | | </procedure> |
| | | </section> |
| | |
| | | |
| | | <step> |
| | | <para>Activate LDIF file access.</para> |
| | | <screen width="80">$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password \ |
| | | > set-connection-handler-prop --handler-name "LDIF Connection Handler" \ |
| | | > --set enabled:true -n</screen> |
| | | <para>The change takes effect immediately.</para> |
| | | </step> |
| | | <step> |
| | | <para>Add the directory where you put LDIF to be processed.</para> |
| | | <screen width="80">$ mkdir /path/to/OpenDJ/config/auto-process-ldif</screen> |
| | | <screen>$ mkdir /path/to/OpenDJ/config/auto-process-ldif</screen> |
| | | <para>This example uses the default value of the |
| | | <literal>ldif-directory</literal> property for the LDIF connection |
| | | handler.</para> |
| | |
| | | exposed. The following example shows monitoring information about the |
| | | <literal>userRoot</literal> backend holding Example.com data.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -p 1389 -b cn=monitor "(cn=userRoot backend)" |
| | | <screen>$ ldapsearch -p 1389 -b cn=monitor "(cn=userRoot backend)" |
| | | dn: cn=userRoot backend,cn=Disk Space Monitor,cn=monitor |
| | | disk-state: normal |
| | | objectClass: top |
| | |
| | | OpenDMK, provided separately due to licensing restrictions. Once you have |
| | | installed OpenDMK, you can set up a connection handler for SNMP.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > create-connection-handler --handler-name "SNMP Connection Handler" \ |
| | | > --type snmp --set enabled:true --set listen-port:11161 |
| | | > --set trap-port:11162 -X -n |
| | |
| | | <command>dsconfig</command> command to configure the JMX connection |
| | | handler.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-connection-handler-prop --handler-name "JMX Connection Handler" \ |
| | | > --set enabled:true -X -n</screen> |
| | | |
| | | <para>By default, no users have privileges to access the JMX connection. The |
| | | following command adds JMX privileges for Directory Manager.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-root-dn-prop --add default-root-privilege-name:jmx-notify \ |
| | | > --add default-root-privilege-name:jmx-read \ |
| | | > --add default-root-privilege-name:jmx-write -X -n</screen> |
| | |
| | | <para>Alternatively, you can connect to a local server process by using the |
| | | server process identifier.</para> |
| | | |
| | | <screen width="80">$ cat ../logs/server.pid |
| | | <screen>$ cat ../logs/server.pid |
| | | 3363 |
| | | $ jvisualvm --openpid 3363 &</screen> |
| | | </section> |
| | |
| | | |
| | | <para>The <command>status</command> command takes administrative credentials |
| | | to read the configuration, as does the Control Panel.</para> |
| | | <screen width="80">$ status -D "cn=Directory Manager" -w password |
| | | <screen>$ status -D "cn=Directory Manager" -w password |
| | | |
| | | --- Server Status --- |
| | | Server Run Status: Started |
| | |
| | | administration port, and so can connect to both local and remote |
| | | servers.</para> |
| | | |
| | | <screen width="80">$ manage-tasks -h opendj.example.com -p 4444 -D "cn=Directory Manager" \ |
| | | <screen>$ manage-tasks -h opendj.example.com -p 4444 -D "cn=Directory Manager" \ |
| | | > -w password -X -n |
| | | |
| | | ID Type Status |
| | |
| | | message.</para> |
| | | <para>The following access log excerpt shows a search operation from the |
| | | local host, with the first three lines wrapped for readability.</para> |
| | | <screen width="80"> |
| | | <screen> |
| | | [21/Jun/2011:08:01:53 +0200] CONNECT conn=4 from=127.0.0.1:49708 |
| | | to=127.0.0.1:1389 protocol=LDAP |
| | | [21/Jun/2011:08:01:53 +0200] SEARCH REQ conn=4 op=0 msgID=1 |
| | |
| | | conditions, and warnings, categorized and identified by severity.</para> |
| | | <para>The following errors log excerpt shows log entries about a |
| | | backup task, with lines wrapped for readability.</para> |
| | | <screen width="80"> |
| | | <screen> |
| | | [22/Jun/2011:12:32:23 +0200] category=BACKEND severity=NOTICE msgID=9896349 |
| | | msg=Backup task 20110622123224088 started execution |
| | | [22/Jun/2011:12:32:23 +0200] category=TOOLS severity=NOTICE msgID=10944792 |
| | |
| | | <para>The <firstterm>replication log</firstterm> traces replication |
| | | events, with entries similar to the errors log. The following excerpt has |
| | | lines wrapped for readability.</para> |
| | | <screen width="80"> |
| | | <screen> |
| | | [22/Jun/2011:14:37:34 +0200] category=SYNC severity=NOTICE msgID=15139026 |
| | | msg=Finished total update: exported domain "dc=example,dc=com" from this |
| | | directory server DS(24065) to all remote directory servers. |
| | |
| | | events. Yet alert notifications are not enabled by default. You can use |
| | | the <command>dsconfig</command> command to enable alert notifications.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-alert-handler-prop --handler-name "JMX Alert Handler" \ |
| | | > --set enabled:true -X -n</screen> |
| | | |
| | |
| | | Before you set up the SMTP-based alert handler, you must identify an SMTP |
| | | server to which OpenDJ sends messages.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-global-configuration-prop --set smtp-server:smtp.example.com -X -n |
| | | $ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > create-alert-handler --handler-name "SMTP Alert Handler" --type smtp \ |
| | |
| | | <step> |
| | | <para>Prevent the server from accepting updates from client |
| | | applications.</para> |
| | | <screen width="80">$ dsconfig -p 5444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 5444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-global-configuration-prop --set writability-mode:internal-only -X -n</screen> |
| | | </step> |
| | | <step> |
| | | <para>Disable replication for the server.</para> |
| | | <screen width="80">$ dsreplication disable -a -p 5444 -h `hostname` -D "cn=Directory Manager" \ |
| | | <screen>$ dsreplication disable -a -p 5444 -h `hostname` -D "cn=Directory Manager" \ |
| | | > -w password -X -n |
| | | Establishing connections ..... Done. |
| | | Disabling replication on base DN dc=example,dc=com of server localhost:5444 |
| | |
| | | <para>With the server no longer receiving traffic or accepting updates |
| | | from clients, and no longer replicating to other servers, you can shut it |
| | | down in preparation for the move.</para> |
| | | <screen width="80">$ stop-ds |
| | | <screen>$ stop-ds |
| | | Stopping Server... |
| | | |
| | | ... msg=The Directory Server is now stopped</screen> |
| | |
| | | </step> |
| | | <step> |
| | | <para>Start the server.</para> |
| | | <screen width="80">$ start-ds |
| | | <screen>$ start-ds |
| | | ... The Directory Server has started successfully</screen> |
| | | </step> |
| | | <step> |
| | | <para>Enable and initialize replication.</para> |
| | | <screen width="80">$ dsreplication enable -I admin -w password -X -n -b dc=example,dc=com \ |
| | | <screen>$ dsreplication enable -I admin -w password -X -n -b dc=example,dc=com \ |
| | | > --host1 localhost --port1 4444 --bindDN1 "cn=Directory Manager" \ |
| | | > --bindPassword1 password --replicationPort1 8989 \ |
| | | > --host2 remotehost --port2 4444 --bindDN2 "cn=Directory Manager" \ |
| | |
| | | </step> |
| | | <step> |
| | | <para>Accept updates from client applications.</para> |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-global-configuration-prop --set writability-mode:enabled -X -n</screen> |
| | | </step> |
| | | <step> |
| | |
| | | <step> |
| | | <para>List information about the contents of the keystore and truststore |
| | | whose contents you want to replace.</para> |
| | | <screen width="80">$ cd /path/to/OpenDJ/config |
| | | <screen>$ cd /path/to/OpenDJ/config |
| | | $ keytool -list -v -keystore admin-keystore -storepass `cat admin-keystore.pin`</screen> |
| | | </step> |
| | | <step> |
| | | <para>Remove the certificate to replace from the keystore and from the |
| | | truststore.</para> |
| | | <screen width="80">$ keytool -delete -alias admin-cert -keystore admin-keystore \ |
| | | <screen>$ keytool -delete -alias admin-cert -keystore admin-keystore \ |
| | | > -storepass `cat admin-keystore.pin` |
| | | $ keytool -delete -alias admin-cert -keystore admin-truststore \ |
| | | > -storepass `cat admin-keystore.pin`</screen> |
| | | </step> |
| | | <step> |
| | | <para>Generate the private key, storing it in the keystore.</para> |
| | | <screen width="80">$ keytool -genkey -alias admin-cert -keyalg RSA \ |
| | | <screen>$ keytool -genkey -alias admin-cert -keyalg RSA \ |
| | | > -dname "CN=<replaceable>hostname</replaceable>, O=Administration Connector Self-Signed Certificate" \ |
| | | > -keystore admin-keystore -storepass `cat admin-keystore.pin` \ |
| | | > -keypass `cat admin-keystore.pin`</screen> |
| | |
| | | </step> |
| | | <step> |
| | | <para>Self-sign what you generated.</para> |
| | | <screen width="80">$ keytool -selfcert -alias admin-cert -keystore admin-keystore \ |
| | | <screen>$ keytool -selfcert -alias admin-cert -keystore admin-keystore \ |
| | | > -storepass `cat admin-keystore.pin`</screen> |
| | | </step> |
| | | <step> |
| | | <para>Export the certificate from the keystore.</para> |
| | | <screen width="80">$ keytool -export -alias admin-cert -keystore admin-keystore \ |
| | | <screen>$ keytool -export -alias admin-cert -keystore admin-keystore \ |
| | | > -storepass `cat admin-keystore.pin` -file admin-cert.crt |
| | | Certificate stored in file <admin-cert.crt></screen> |
| | | </step> |
| | | <step> |
| | | <para>Import the certificate into the truststore.</para> |
| | | <screen width="80">$ keytool -import -alias admin-cert -keystore admin-truststore \ |
| | | <screen>$ keytool -import -alias admin-cert -keystore admin-truststore \ |
| | | > -storepass `cat admin-keystore.pin` -file admin-cert.crt |
| | | Owner: CN=<replaceable>hostname</replaceable>, O=Administration Connector Self-Signed Certificate |
| | | Issuer: CN=<replaceable>hostname</replaceable>, O=Administration Connector Self-Signed Certificate |
| | |
| | | |
| | | <step> |
| | | <para>Start <command>dsconfig</command> in interactive mode.</para> |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password</screen> |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password</screen> |
| | | </step> |
| | | <step> |
| | | <para>Select the Root DN menu.</para> |
| | |
| | | |
| | | <step> |
| | | <para>Determine the privileges to add.</para> |
| | | <screen width="80">$ cat privilege.ldif |
| | | <screen>$ cat privilege.ldif |
| | | dn: uid=kvaughan,ou=People,dc=example,dc=com |
| | | changetype: modify |
| | | add: ds-privilege-name |
| | |
| | | <para>Prior to having the privileges, Kirsten gets messages about |
| | | insufficent access when trying to read the server configuration, or |
| | | reset a user password.</para> |
| | | <screen width="80">$ ldapsearch -p 1389 -D "uid=kvaughan,ou=People,dc=example,dc=com" \ |
| | | <screen>$ ldapsearch -p 1389 -D "uid=kvaughan,ou=People,dc=example,dc=com" \ |
| | | > -w bribery -b cn=config "(objectclass=*)" |
| | | SEARCH operation failed |
| | | Result Code: 50 (Insufficient Access Rights) |
| | |
| | | <step> |
| | | <para>Apply the change as a user with the |
| | | <literal>privilege-change</literal> privilege.</para> |
| | | <screen width="80">$ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -f privilege.ldif |
| | | <screen>$ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -f privilege.ldif |
| | | Processing MODIFY request for uid=kvaughan,ou=People,dc=example,dc=com |
| | | MODIFY operation successful for DN uid=kvaughan,ou=People,dc=example,dc=com</screen> |
| | | <para>At this point, Kirsten can perform the operations requiring |
| | | privileges.</para> |
| | | <screen width="80">$ ldapsearch -p 1389 -D "uid=kvaughan,ou=People,dc=example,dc=com" \ |
| | | <screen>$ ldapsearch -p 1389 -D "uid=kvaughan,ou=People,dc=example,dc=com" \ |
| | | > -w bribery -b cn=config "(objectclass=*)" |
| | | dn: cn=config |
| | | ds-cfg-return-bind-error-messages: false |
| | |
| | | |
| | | <step> |
| | | <para>Create an LDAP subentry that specifies the collective attributes.</para> |
| | | <screen width="80">$ cat collective.ldif |
| | | <screen>$ cat collective.ldif |
| | | dn: cn=Administrator Privileges,dc=example,dc=com |
| | | objectClass: collectiveAttributeSubentry |
| | | objectClass: extensibleObject |
| | |
| | | </step> |
| | | <step> |
| | | <para>Observe that the change takes effect immediately.</para> |
| | | <screen width="80">$ ldappasswordmodify -p 1389 -D "uid=kvaughan,ou=People,dc=example,dc=com" \ |
| | | <screen>$ ldappasswordmodify -p 1389 -D "uid=kvaughan,ou=People,dc=example,dc=com" \ |
| | | > -w bribery -a "dn:uid=scarter,ou=People,dc=example,dc=com" -n changeit |
| | | The LDAP password modify operation was successful</screen> |
| | | </step> |
| | |
| | | |
| | | <para>This works when the only attributes you do not want world-readable |
| | | are password attributes.</para> |
| | | <programlisting width="80" language="ldif">aci: (target ="ldap:///dc=example,dc=com")(targetattr != |
| | | <programlisting language="ldif">aci: (target ="ldap:///dc=example,dc=com")(targetattr != |
| | | "authPassword || userPassword")(version 3.0;acl "Anonymous read-search access"; |
| | | allow (read, search, compare)(userdn = "ldap:///anyone");) |
| | | </programlisting> |
| | |
| | | |
| | | <para>Directory Administrators need privileges as well for full access to |
| | | administrative operations.</para> |
| | | <programlisting width="80" language="ldif">aci: (target="ldap:///dc=example,dc=com") (targetattr = |
| | | <programlisting language="ldif">aci: (target="ldap:///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> |
| | |
| | | <title>ACI: Change Own Password</title> |
| | | |
| | | <para>By default this capability is set in a global ACI.</para> |
| | | <programlisting width="80" language="ldif">aci: (target ="ldap:///ou=People,dc=example,dc=com")(targetattr = |
| | | <programlisting language="ldif">aci: (target ="ldap:///ou=People,dc=example,dc=com")(targetattr = |
| | | "authPassword || userPassword")(version 3.0;acl "Allow users to change pass |
| | | words"; allow (write)(userdn = "ldap:///self");)</programlisting> |
| | | </example> |
| | |
| | | |
| | | <para>For some static groups such as carpoolers and social club members, |
| | | you might choose to let users manage their own memberships.</para> |
| | | <programlisting width="80" language="ldif">aci: (target ="ldap:///ou=Self Service,ou=Groups,dc=example,dc=com")( |
| | | <programlisting language="ldif">aci: (target ="ldap:///ou=Self Service,ou=Groups,dc=example,dc=com")( |
| | | targetattr = "member")(version 3.0;acl "Self registration"; allow(selfwrite)( |
| | | userdn = "ldap:///uid=*,ou=People,dc=example,dc=com");)</programlisting> |
| | | </example> |
| | |
| | | <title>ACI: Manage Self Service Groups</title> |
| | | |
| | | <para>Let users create and delete self-managed groups.</para> |
| | | <programlisting width="80" language="ldif">aci: (target ="ldap:///ou=Self Service,ou=Groups,dc=example,dc=com")( |
| | | <programlisting language="ldif">aci: (target ="ldap:///ou=Self Service,ou=Groups,dc=example,dc=com")( |
| | | targattrfilters="add=objectClass:(objectClass=groupOfNames)")(version 3.0; |
| | | acl "All can create self service groups"; allow (add)(userdn= " |
| | | ldap:///uid=*,ou=People,dc=example,dc=com");) |
| | |
| | | <title>ACI: Permit Clear Text Access Over Loopback Only</title> |
| | | |
| | | <para>This ACI uses IP address and Security Strength Factor subjects.</para> |
| | | <programlisting width="80" language="ldif">aci: (target = "ldap:///dc=example,dc=com")(targetattr = |
| | | <programlisting language="ldif">aci: (target = "ldap:///dc=example,dc=com")(targetattr = |
| | | "*")(version 3.0;acl "Use loopback only for LDAP in the clear"; deny (all)( |
| | | ip != "127.0.0.1" and ssf <= "1");)</programlisting> |
| | | <para>The <literal>ssf</literal> is one for example when using SSL but you |
| | |
| | | <para>In this example, Babs Jensen is the owner of a small group of people |
| | | who are willing to carpool.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -p 1389 -D "uid=bjensen,ou=people,dc=example,dc=com" -w hifalutin \ |
| | | <screen>$ ldapsearch -p 1389 -D "uid=bjensen,ou=people,dc=example,dc=com" -w hifalutin \ |
| | | > -b "ou=Self Service,ou=Groups,dc=example,dc=com" "cn=*" |
| | | dn: cn=Carpoolers,ou=Self Service,ou=Groups,dc=example,dc=com |
| | | objectClass: groupOfNames |
| | |
| | | asking for the <literal>aclRights</literal> attribute, shows what rights |
| | | Babs has on the entry.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -J effectiverights -p 1389 \ |
| | | <screen>$ ldapsearch -J effectiverights -p 1389 \ |
| | | > -D "uid=bjensen,ou=people,dc=example,dc=com" -w hifalutin \ |
| | | > -b "ou=Self Service,ou=Groups,dc=example,dc=com" "cn=*" aclRights |
| | | dn: cn=Carpoolers,ou=Self Service,ou=Groups,dc=example,dc=com |
| | |
| | | <para>Requesting the <literal>aclRightsInfo</literal> attribute results in |
| | | information about the ACIs applied to arrive at the results.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -J effectiverights -p 1389 \ |
| | | <screen>$ ldapsearch -J effectiverights -p 1389 \ |
| | | > -D "uid=bjensen,ou=people,dc=example,dc=com" -w hifalutin \ |
| | | > -b "ou=Self Service,ou=Groups,dc=example,dc=com" "cn=*" aclRights \ |
| | | > aclRightsInfo |
| | |
| | | policy settings using the <command>dsconfig</command> command as |
| | | follows.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > get-password-policy-prop --policy-name "Default Password Policy" --advanced |
| | | Property : Value(s) |
| | | ------------------------------------------:-------------------------- |
| | |
| | | value. Even the directory manager cannot see the plain text value of a user's |
| | | password.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -p 1389 -D "cn=Directory Manager" -w password \ |
| | | <screen>$ ldapsearch -p 1389 -D "cn=Directory Manager" -w password \ |
| | | > -b dc=example,dc=com uid=bjensen userpassword |
| | | dn: uid=bjensen,ou=People,dc=example,dc=com |
| | | userpassword: {SSHA}QWAtw8ch/9850HNFRRqLNMIQc1YhxCnOoGmk1g==</screen> |
| | |
| | | <para>The password policy that applies to a user is identified by the |
| | | operational attribute, <literal>pwdPolicySubentry</literal>.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -p 1389 -b dc=example,dc=com uid=bjensen pwdPolicySubentry |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com uid=bjensen pwdPolicySubentry |
| | | dn: uid=bjensen,ou=People,dc=example,dc=com |
| | | pwdPolicySubentry: cn=Default Password Policy,cn=Password Policies,cn=config</screen> |
| | | </section> |
| | |
| | | words, and prevent password reuse.</para> |
| | | <step> |
| | | <para>Enable the appropriate password validator.</para> |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-password-validator-prop --validator-name Dictionary --set enabled:true \ |
| | | > -X -n</screen> |
| | | </step> |
| | | <step> |
| | | <para>Apply the changes to the default password policy.</para> |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-password-policy-prop --policy-name "Default Password Policy" \ |
| | | > --set max-password-age:90d --set min-password-age:4w \ |
| | | > --set password-history-count:7 --set password-validator:Dictionary -X -n</screen> |
| | | </step> |
| | | <step> |
| | | <para>Check your work.</para> |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > get-password-policy-prop --policy-name "Default Password Policy" |
| | | Property : Value(s) |
| | | ------------------------------------------:-------------------------- |
| | |
| | | yet used their credentials to bind.</para> |
| | | <step> |
| | | <para>Create the new password policy.</para> |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > create-password-policy --policy-name "New Account Password Policy" \ |
| | | > --set default-password-storage-scheme:"Salted SHA-1" \ |
| | | > --set force-change-on-add:true --set password-attribute:userPassword -X -n</screen> |
| | | </step> |
| | | <step> |
| | | <para>Check your work.</para> |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > get-password-policy-prop --policy-name "New Account Password Policy" |
| | | Property : Value(s) |
| | | ------------------------------------------:------------- |
| | |
| | | <step> |
| | | <para>Prevent users from selecting their own password policy.</para> |
| | | |
| | | <screen width="80">$ cat protectpwp.ldif |
| | | <screen>$ cat protectpwp.ldif |
| | | dn: ou=People,dc=example,dc=com |
| | | changetype: modify |
| | | add: aci |
| | |
| | | <para>Update the user's <literal>ds-pwp-password-policy-dn</literal> |
| | | attribute.</para> |
| | | |
| | | <screen width="80">$ cat newuser.ldif |
| | | <screen>$ cat newuser.ldif |
| | | dn: uid=newuser,ou=People,dc=example,dc=com |
| | | uid: newuser |
| | | objectClass: person |
| | |
| | | </step> |
| | | <step> |
| | | <para>Check your work.</para> |
| | | <screen width="80">$ ldapsearch -p 1389 -D "cn=Directory Manager" -w password \ |
| | | <screen>$ ldapsearch -p 1389 -D "cn=Directory Manager" -w password \ |
| | | > -b dc=example,dc=com uid=newuser pwdPolicySubentry |
| | | dn: uid=newuser,ou=People,dc=example,dc=com |
| | | pwdPolicySubentry: cn=New Account Password Policy,cn=Password Policies,cn=config</screen> |
| | |
| | | <literal>ds-pwp-password-policy-dn</literal> attribute for group |
| | | members' entries.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > create-virtual-attribute --name "Dir Admin Password Policy" \ |
| | | > --type user-defined --set attribute-type:ds-pwp-password-policy-dn \ |
| | | > --set value:"cn=Root Password Policy,cn=Password Policies,cn=config" \ |
| | |
| | | <step> |
| | | <para>Check your work.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -p 1389 -b dc=example,dc=com uid=kvaughan pwdPolicySubentry |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com uid=kvaughan pwdPolicySubentry |
| | | dn: uid=kvaughan,ou=People,dc=example,dc=com |
| | | pwdPolicySubentry: cn=Root Password Policy,cn=Password Policies,cn=config</screen> |
| | | </step> |
| | |
| | | |
| | | <step> |
| | | <para>Identify the SMTP server to which OpenDJ sends messages.</para> |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-global-configuration-prop --set smtp-server:smtp.example.com -X -n</screen> |
| | | </step> |
| | | |
| | | <step> |
| | | <para>Set up OpenDJ to be able to mail users about account status.</para> |
| | | <screen width="80">dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-account-status-notification-handler-prop \ |
| | | > --handler-name "SMTP Handler" --set enabled:true \ |
| | | > --set email-address-attribute-type:mail -X -n</screen> |
| | |
| | | <step> |
| | | <para>Adjust applicable password policies to use the account status |
| | | notification handler you configured.</para> |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-password-policy-prop --policy-name "Default Password Policy" \ |
| | | > --set account-status-notification-handler:"SMTP Handler" -X -n</screen> |
| | | </step> |
| | |
| | | <literal>ref</literal> attribute with an LDAP URL to an existing entry. |
| | | This section demonstrates use of the latter approach.</para> |
| | | |
| | | <screen width="80">$ cat referral.ldif |
| | | <screen>$ cat referral.ldif |
| | | dn: ou=People,dc=example,dc=com |
| | | changetype: modify |
| | | add: objectClass |
| | |
| | | <literal>ou=People,dc=example,dc=com</literal>. OpenDJ can now return |
| | | a referral for operations under the People organizational unit.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -p 1389 -b dc=example,dc=com uid=bjensen description |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com uid=bjensen description |
| | | SearchReference(referralURLs= |
| | | {ldap://opendj.example.com:2389/ou=People,dc=example,dc=com??sub?}) |
| | | $ ldapsearch -p 1389 -b dc=example,dc=com ou=people |
| | |
| | | <para>To access the entry instead of the referral, use the Manage DSAIT |
| | | control.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -p 1389 -b dc=example,dc=com -J ManageDSAIT ou=people |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com -J ManageDSAIT ou=people |
| | | dn: ou=People,dc=example,dc=com |
| | | ou: People |
| | | objectClass: organizationalunit |
| | |
| | | <para>You can start the replication process by using the |
| | | <command>dsreplication enable</command> command.</para> |
| | | |
| | | <screen width="80">$ dsreplication enable -I admin -w password -X -n -b dc=example,dc=com \ |
| | | <screen>$ dsreplication enable -I admin -w password -X -n -b dc=example,dc=com \ |
| | | > --host1 `hostname` --port1 4444 --bindDN1 "cn=Directory Manager" \ |
| | | > --bindPassword1 password --replicationPort1 8989 \ |
| | | > --host2 `hostname` --port2 5444 --bindDN2 "cn=Directory Manager" \ |
| | |
| | | <para>Start replication with the <command>dsreplication |
| | | initialize-all</command> command.</para> |
| | | |
| | | <screen width="80">$ dsreplication initialize-all -I admin -w password -X -n -b dc=example,dc=com \ |
| | | <screen>$ dsreplication initialize-all -I admin -w password -X -n -b dc=example,dc=com \ |
| | | > -h `hostname` -p 4444 |
| | | |
| | | Initializing base DN dc=example,dc=com with the contents from localhost:4444: |
| | |
| | | <step> |
| | | <para>Start replication with the <command>dsreplication |
| | | initialize-all</command> command.</para> |
| | | <screen width="80">$ dsreplication initialize-all -I admin -w password -X -n -b dc=example,dc=com \ |
| | | <screen>$ dsreplication initialize-all -I admin -w password -X -n -b dc=example,dc=com \ |
| | | > ;-h `hostname` -p 4444 |
| | | Initializing base DN dc=example,dc=com with the contents from localhost:4444: |
| | | 161 entries processed (100 % complete). |
| | |
| | | </step> |
| | | <step> |
| | | <para>Enable replication on the new replica.</para> |
| | | <screen width="80"> |
| | | <screen> |
| | | $ dsreplication enable -I admin -w password -X -n -b dc=example,dc=com \ |
| | | > --host1 `hostname` --port1 4444 --bindDN1 "cn=Directory Manager" \ |
| | | > --bindPassword1 password --replicationPort1 8989 \ |
| | |
| | | </step> |
| | | <step> |
| | | <para>Prepare the new replica for initialization.</para> |
| | | <screen width="80">$ dsreplication pre-external-initialization -I admin -w password -X -n -p 6444 \ |
| | | <screen>$ dsreplication pre-external-initialization -I admin -w password -X -n -p 6444 \ |
| | | > -b dc=example,dc=com |
| | | |
| | | Preparing base DN dc=example,dc=com to be initialized externally ..... Done. |
| | |
| | | </step> |
| | | <step> |
| | | <para>Initialize replication on the new replica.</para> |
| | | <screen width="80">$ dsreplication post-external-initialization -I admin -w password -X -n \ |
| | | <screen>$ dsreplication post-external-initialization -I admin -w password -X -n \ |
| | | > -p 6444 -b dc=example,dc=com |
| | | |
| | | Updating replication information on base DN dc=example,dc=com ..... Done. |
| | |
| | | <para>Get the replication server property that identifies one of the |
| | | replication service host:port combinations that you need to restart |
| | | replication.</para> |
| | | <screen width="80">$ dsconfig -p 5444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 5444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > get-replication-server-prop --provider-name "Multimaster Synchronization" \ |
| | | > --property replication-server -X |
| | | Property : Value(s) |
| | |
| | | <step> |
| | | <para>Reset the replication server property to the default (no |
| | | replication server) to pause replication.</para> |
| | | <screen width="80">$ dsconfig -p 5444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 5444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-replication-server-prop --provider-name "Multimaster Synchronization" \ |
| | | > --reset replication-server -X -n</screen> |
| | | <para>Do not modify the replica for which replication is paused.</para> |
| | |
| | | <step performance="optional"> |
| | | <para>When you are ready to resume replication, set the replication server |
| | | property to the host:port combination of an active replication server.</para> |
| | | <screen width="80">$ dsconfig -p 5444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 5444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-replication-server-prop --provider-name "Multimaster Synchronization" \ |
| | | > --set replication-server:localhost:8989 -X -n</screen> |
| | | </step> |
| | |
| | | <step> |
| | | <para>Stop replication using the <command>dsreplication disable</command> |
| | | command.</para> |
| | | <screen width="80">$ dsreplication disable -a -p 5444 -h `hostname` -D "cn=Directory Manager" \ |
| | | <screen>$ dsreplication disable -a -p 5444 -h `hostname` -D "cn=Directory Manager" \ |
| | | > -w password -X -n |
| | | Establishing connections ..... Done. |
| | | Disabling replication on base DN cn=admin data of server localhost:5444 |
| | |
| | | <para>Enable replication with the appropriate |
| | | <option>--noReplicationServer</option> and |
| | | <option>--onlyReplicationServer</option> options.</para> |
| | | <screen width="80">$ dsreplication enable -I admin -w password -X -n -b dc=example,dc=com \ |
| | | <screen>$ dsreplication enable -I admin -w password -X -n -b dc=example,dc=com \ |
| | | > --host1 `hostname` --port1 4444 --bindDN1 "cn=Directory Manager" \ |
| | | > --bindPassword1 password --noReplicationServer1 \ |
| | | > --host2 `hostname` --port2 6444 --bindDN2 "cn=Directory Manager" \ |
| | |
| | | </step> |
| | | <step> |
| | | <para>Initialize replication from one of the directory servers.</para> |
| | | <screen width="80">$ dsreplication initialize-all -I admin -w password -X -n -b dc=example,dc=com \ |
| | | <screen>$ dsreplication initialize-all -I admin -w password -X -n -b dc=example,dc=com \ |
| | | > -h `hostname` -p 4444 |
| | | |
| | | Initializing base DN dc=example,dc=com with the contents from localhost:4444: |
| | |
| | | <step> |
| | | <para>Set the group ID for each group by replication domain on the |
| | | directory servers.</para> |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-replication-domain-prop --provider-name "MultimasterSynchronization" \ |
| | | > --domain-name "dc=example,dc=com" --set group-id:1 -X -n |
| | | |
| | |
| | | </step> |
| | | <step> |
| | | <para>Set the group ID for each group on the replication servers.</para> |
| | | <screen width="80">$ dsconfig -p 6444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 6444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-replication-server-prop --provider-name "Multimaster Synchronization" \ |
| | | > --set group-id:1 -X -n |
| | | $ dsconfig -p 7444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | |
| | | from the replication protocol, and refuse updates from client |
| | | applications.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 5444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 5444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-global-configuration-prop --set writability-mode:internal-only -X -n</screen> |
| | | </section> |
| | | |
| | |
| | | <para>For each directory server, set safe data mode for the replication |
| | | domain, and also set the safe data level.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-replication-domain-prop --provider-name "Multimaster Synchronization" \ |
| | | > --domain-name "dc=example,dc=com" \ |
| | | > --set assured-type:safe-data --set assured-sd-level:1 -X -n |
| | |
| | | <para>For each directory server, set safe read mode for the replication |
| | | domain.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-replication-domain-prop --provider-name "Multimaster Synchronization" \ |
| | | > --domain-name "dc=example,dc=com" --set assured-type:safe-read -X -n |
| | | |
| | |
| | | fractional replica to include only some <literal>inetOrgPerson</literal> |
| | | attributes.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-replication-domain-prop --provider-name "Multimaster Synchronization" \ |
| | | --domain-name "dc=example,dc=com" -X -n --set \ |
| | | fractional-include:inetorgperson:cn,givenname,mail,mobile,sn,telephonenumber</screen> |
| | |
| | | <para>As another example, you might exclude a custom attribute called |
| | | <literal>sessionToken</literal> from being replicated.</para> |
| | | |
| | | <screen width="80">dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-replication-domain-prop --provider-name "Multimaster Synchronization" \ |
| | | --domain-name "dc=example,dc=com" --set fractional-exclude:*:sessionToken -X -n</screen> |
| | | |
| | |
| | | the publicly visible data available before any changes have been |
| | | made.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -b cn=changelog -p 1389 "(objectclass=*)" \* + |
| | | <screen>$ ldapsearch -b cn=changelog -p 1389 "(objectclass=*)" \* + |
| | | dn: cn=changelog |
| | | cn: changelog |
| | | objectClass: top |
| | |
| | | <para>Notice the value of the <literal>changeLogCookie</literal> attribute |
| | | for the last of the two changes.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -b cn=changelog -p 1389 -D "cn=Directory Manager" -w password \ |
| | | <screen>$ ldapsearch -b cn=changelog -p 1389 -D "cn=Directory Manager" -w password \ |
| | | > -J "1.3.6.1.4.1.26027.1.5.4:false" "(objectclass=*)" \* + |
| | | dn: cn=changelog |
| | | cn: changelog |
| | |
| | | |
| | | <para>In this example, a description was added to Babs Jensen's entry.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -b cn=changelog -p 1389 -D "cn=Directory Manager" -w password \ |
| | | <screen>$ ldapsearch -b cn=changelog -p 1389 -D "cn=Directory Manager" -w password \ |
| | | > -J "1.3.6.1.4.1.26027.1.5.4:false:\ |
| | | > dc=example,dc=com:0000013087cbc34a12d100000002;" "(objectclass=*)" \* + |
| | | dn: cn=changelog |
| | |
| | | |
| | | <para>If we base64-decode the changes, we see the following.</para> |
| | | |
| | | <screen width="80">$ base64 decode -d YWRkO...gotCg== |
| | | <screen>$ base64 decode -d YWRkO...gotCg== |
| | | add: description |
| | | description: A third change |
| | | - |
| | |
| | | <title>To Set Search Limits For a User</title> |
| | | <step> |
| | | <para>Change the user entry to set the limits to override.</para> |
| | | <screen width="80">$ cat limit.ldif |
| | | <screen>$ cat limit.ldif |
| | | dn: uid=bjensen,ou=People,dc=example,dc=com |
| | | changetype: modify |
| | | add: ds-rlim-size-limit |
| | |
| | | <para>Now when Babs Jensen performs a search returning more than 10 |
| | | entries, she sees the following message.</para> |
| | | |
| | | <screen width="80">Result Code: 4 (Size Limit Exceeded) |
| | | <screen>Result Code: 4 (Size Limit Exceeded) |
| | | Additional Information: This search operation has sent the maximum of |
| | | 10 entries to the client</screen> |
| | | </step> |
| | |
| | | <step> |
| | | <para>Create an LDAP subentry to specify the limits using collective |
| | | attributes.</para> |
| | | <screen width="80">$ cat grouplim.ldif |
| | | <screen>$ cat grouplim.ldif |
| | | dn: cn=Remove Administrator Search Limits,dc=example,dc=com |
| | | objectClass: collectiveAttributeSubentry |
| | | objectClass: extensibleObject |
| | |
| | | </step> |
| | | <step> |
| | | <para>Check the results.</para> |
| | | <screen width="80">$ ldapsearch -p 1389 -b dc=example,dc=com uid=kvaughan + | grep ds-rlim |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com uid=kvaughan + | grep ds-rlim |
| | | ds-rlim-lookthrough-limit: 0 |
| | | ds-rlim-time-limit: 0 |
| | | ds-rlim-size-limit: 0</screen> |
| | |
| | | global configuration property, <literal>idle-time-limit</literal>. By |
| | | default, no idle time limit is set.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-global-configuration-prop --set idle-time-limit:24h -X -n</screen> |
| | | |
| | | <para>The example shown sets the idle time limit to 24 hours.</para> |
| | |
| | | add groups with large numbers of members, those add requests can go beyond |
| | | the 5 MB limit.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-connection-handler-prop --handler-name "LDAP Connection Handler" \ |
| | | > --set max-request-size:20mb -X -n</screen> |
| | | |
| | |
| | | of directory entries, such as <literal>givenName</literal> or |
| | | <literal>mail</literal>.</para> |
| | | <para>Here is an example of an attribute type definition.</para> |
| | | <programlisting language="ldif" width="80"># Attribute type definition |
| | | <programlisting language="ldif"># Attribute type definition |
| | | attributeTypes: ( 0.9.2342.19200300.100.1.3 NAME ( 'mail' 'rfc822Mailbox' ) |
| | | EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch |
| | | SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} X-ORIGIN 'RFC 4524' )</programlisting> |
| | |
| | | object classes include <literal>person</literal> and |
| | | <literal>organizationalUnit</literal>.</para> |
| | | <para>Here is an example of an object class definition.</para> |
| | | <programlisting language="ldif" width="80"># Object class definition |
| | | <programlisting language="ldif"># Object class definition |
| | | objectClasses: ( 2.5.6.6 NAME 'person' SUP top STRUCTURAL MUST ( sn $ cn ) |
| | | MAY ( userPassword $ telephoneNumber $ seeAlso $ description ) |
| | | X-ORIGIN 'RFC 4519' )</programlisting> |
| | |
| | | production by adapting the content for use with the |
| | | <command>ldapmodify</command> command, for example.</para> |
| | | |
| | | <screen width="80">$ cat config/schema/99-user.ldif |
| | | <screen>$ cat config/schema/99-user.ldif |
| | | dn: cn=schema |
| | | objectClass: top |
| | | objectClass: ldapSubentry |
| | |
| | | <para>To test your schema definition, add the object class and attribute |
| | | to an entry.</para> |
| | | |
| | | <screen width="80">$ cat custom-attr.ldif |
| | | <screen>$ cat custom-attr.ldif |
| | | dn: uid=bjensen,ou=People,dc=example,dc=com |
| | | changetype: modify |
| | | add: objectClass |
| | |
| | | classes defined per entry, you can relax schema checking to warn rather |
| | | than reject entries having this issue.</para> |
| | | |
| | | <screen width="80">$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password \ |
| | | > set-global-configuration-prop |
| | | --set single-structural-objectclass-behavior:warn -X -n</screen> |
| | | |
| | | <para>You can allow attribute values that do not respect the defined syntax |
| | | with the <command>dsconfig</command> command as well.</para> |
| | | |
| | | <screen width="80">$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password \ |
| | | > set-global-configuration-prop |
| | | --set invalid-attribute-syntax-behavior:warn -X -n</screen> |
| | | |
| | |
| | | you simply want to turn off schema checking temporarily to speed up import |
| | | processing.</para> |
| | | |
| | | <screen width="80">$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password \ |
| | | > set-global-configuration-prop --set check-schema:false -X -n</screen> |
| | | </section> |
| | | |
| | |
| | | <para>Use one of the following techniques.</para> |
| | | <listitem> |
| | | <para>Use the start-ds command.</para> |
| | | <screen width='80'>$ OpenDJ/bin/start-ds</screen> |
| | | <screen>$ OpenDJ/bin/start-ds</screen> |
| | | <para>Alternatively, you can specify the --no-detach option to start |
| | | the server in the foreground.</para> |
| | | </listitem> |
| | |
| | | <para>Unless you run OpenDJ as root, use the -u |
| | | <replaceable>userName</replaceable> option to specify the user |
| | | who installed OpenDJ.</para> |
| | | <screen width='80'>$ sudo OpenDJ/bin/create-rc-script -f /etc/init.d/opendj -u mark |
| | | <screen>$ sudo OpenDJ/bin/create-rc-script -f /etc/init.d/opendj -u mark |
| | | [sudo] password for mark: |
| | | $ sudo /etc/init.d/opendj start</screen> |
| | | <para>For example, on Linux if you run OpenDJ as root, you can use the |
| | | RC script to start the server at system boot, and stop the server at |
| | | system shutdown.</para> |
| | | <screen width='80'>$ sudo update-rc.d opendj defaults |
| | | <screen>$ sudo update-rc.d opendj defaults |
| | | update-rc.d: warning: /etc/init.d/opendj missing LSB information |
| | | update-rc.d: see <http://wiki.debian.org/LSBInitScripts> |
| | | Adding system startup for /etc/init.d/opendj ... |
| | |
| | | <listitem> |
| | | <para>(Windows) Register OpenDJ as a Windows Service, and then manage |
| | | the service through Windows administration tools.</para> |
| | | <screen width='80'>C:\Users\Mark> OpenDJ\bat\windows-service.bat --enableService</screen> |
| | | <screen>C:\Users\Mark> OpenDJ\bat\windows-service.bat --enableService</screen> |
| | | </listitem> |
| | | </itemizedlist> |
| | | </section> |
| | |
| | | <para>Use one of the following techniques.</para> |
| | | <listitem> |
| | | <para>Use the stop-ds command.</para> |
| | | <screen width='80'>$ OpenDJ/bin/stop-ds</screen> |
| | | <screen>$ OpenDJ/bin/stop-ds</screen> |
| | | </listitem> |
| | | <listitem> |
| | | <para>(UNIX) Create an RC script, and then use the script to stop |
| | | the server.</para> |
| | | <screen width='80'>$ sudo OpenDJ/bin/create-rc-script -f /etc/init.d/opendj -u mark |
| | | <screen>$ sudo OpenDJ/bin/create-rc-script -f /etc/init.d/opendj -u mark |
| | | [sudo] password for mark: |
| | | $ sudo /etc/init.d/opendj stop</screen> |
| | | </listitem> |
| | | <listitem> |
| | | <para>(Windows) Register OpenDJ as a Windows Service, and then manage |
| | | the service through Windows administration tools.</para> |
| | | <screen width='80'>C:\Users\Mark> OpenDJ\bat\windows-service.bat --enableService</screen> |
| | | <screen>C:\Users\Mark> OpenDJ\bat\windows-service.bat --enableService</screen> |
| | | </listitem> |
| | | </itemizedlist> |
| | | </section> |
| | |
| | | <para>Use one of the following techniques.</para> |
| | | <listitem> |
| | | <para>Use the stop-ds command.</para> |
| | | <screen width='80'>$ OpenDJ/bin/stop-ds --restart</screen> |
| | | <screen>$ OpenDJ/bin/stop-ds --restart</screen> |
| | | </listitem> |
| | | <listitem> |
| | | <para>(UNIX) Create an RC script, and then use the script to stop |
| | | the server.</para> |
| | | <screen width='80'>$ sudo OpenDJ/bin/create-rc-script -f /etc/init.d/opendj -u mark |
| | | <screen>$ sudo OpenDJ/bin/create-rc-script -f /etc/init.d/opendj -u mark |
| | | [sudo] password for mark: |
| | | $ /etc/init.d/opendj restart</screen> |
| | | </listitem> |
| | | <listitem> |
| | | <para>(Windows) Register OpenDJ as a Windows Service, and then manage |
| | | the service through Windows administration tools.</para> |
| | | <screen width='80'>C:\Users\Mark> OpenDJ\bat\windows-service.bat --enableService</screen> |
| | | <screen>C:\Users\Mark> OpenDJ\bat\windows-service.bat --enableService</screen> |
| | | </listitem> |
| | | </itemizedlist> |
| | | </section> |
| | |
| | | warn when entries have more than one structural object class instead of |
| | | reject such entries being added, set the property as follows.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-global-configuration-prop |
| | | > --set single-structural-objectclass-behavior:warn -X -n</screen> |
| | | |
| | |
| | | software. For example, the Java environment is distributed with a key store |
| | | holding many CA certificates.</para> |
| | | |
| | | <screen width="80">$ keytool -list -keystore $JAVA_HOME/lib/security/cacerts -storepass changeit \ |
| | | <screen>$ keytool -list -keystore $JAVA_HOME/lib/security/cacerts -storepass changeit \ |
| | | > | wc -l |
| | | 334</screen> |
| | | |
| | |
| | | debug traces from <literal>javax.net.debug</literal> into the |
| | | <filename>logs/server.out</filename> file.</para> |
| | | |
| | | <screen width="80">OPENDJ_JAVA_ARGS="-Djavax.net.debug=all" start-ds</screen> |
| | | <screen>OPENDJ_JAVA_ARGS="-Djavax.net.debug=all" start-ds</screen> |
| | | </section> |
| | | |
| | | <section> |
| | |
| | | <literal>uid=bjensen</literal> as traced in the access log. In the access |
| | | log itself, each line starts with a time stamp.</para> |
| | | |
| | | <screen width="80">[27/Jun/2011:17:23:00 +0200] CONNECT conn=19 from=127.0.0.1:56641 |
| | | <screen>[27/Jun/2011:17:23:00 +0200] CONNECT conn=19 from=127.0.0.1:56641 |
| | | to=127.0.0.1:1389 protocol=LDAP |
| | | [27/Jun/2011:17:23:00 +0200] SEARCH REQ conn=19 op=0 msgID=1 |
| | | base="dc=example,dc=com" scope=wholeSubtree filter="(uid=bjensen)" attrs="ALL" |
| | |
| | | have <literal>category=SYNC</literal>. The messages have the following form. |
| | | Here the line is folded for readability.</para> |
| | | |
| | | <screen width="80"> |
| | | [27/Jun/2011:14:37:48 +0200] category=SYNC severity=INFORMATION msgID=14680169 |
| | | <screen>[27/Jun/2011:14:37:48 +0200] category=SYNC severity=INFORMATION msgID=14680169 |
| | | msg=Replication server accepted a connection from 10.10.0.10/10.10.0.10:52859 |
| | | to local address 0.0.0.0/0.0.0.0:8989 but the SSL handshake failed. This is |
| | | probably benign, but may indicate a transient network outage or a |
| | |
| | | of OpenDJ you use to reproduce the problem. The version includes both a |
| | | version number and also a build time stamp.</para> |
| | | |
| | | <screen width="80">$ dsconfig --version |
| | | <screen>$ dsconfig --version |
| | | OpenDJ <?eval ${project.version}?> |
| | | Build <replaceable>yyyymmddhhmmss</replaceable>Z</screen> |
| | | |
| | |
| | | settings, so to force OpenDJ to compress the entries, import the data |
| | | from LDIF.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-backend-prop --backend-name userRoot --set entries-compressed:true -X -n |
| | | $ import-ldif -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > -l /path/to/Example.ldif -n userRoot -b dc=example,dc=com -t 0 |
| | |
| | | JVM. Test database pre-load on startup by setting the |
| | | <literal>preload-time-limit</literal> for the backend.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-backend-prop --backend-name userRoot --set preload-time-limit:30m -X -n</screen> |
| | | |
| | | <para>Database pre-load is single-threaded, and loads each database one |
| | |
| | | you have a few large static groups and applications that regularly check |
| | | group membership, you could cache your group entries.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > create-entry-cache --cache-name "Large Group Entry Cache" --type fifo \ |
| | | > --set cache-level:1 --set include-filter:"(ou=Large Static Groups)" \ |
| | | > --set max-entries:10 --set enabled:true -X -n</screen> |
| | |
| | | bottleneck, as each client request results in multiple access log |
| | | messages. Consider disabling the access log in such cases.</para> |
| | | |
| | | <screen width="80">$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > set-log-publisher-prop --publisher-name "File-Based Access Logger" \ |
| | | > --set enabled:false -X -n</screen> |
| | | </section> |
| | |
| | | <para>These virtual attributes are typically operational, so you get them |
| | | back from a search only when you request them.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -p 1389 -b dc=example,dc=com dc=example |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com dc=example |
| | | dn: dc=example,dc=com |
| | | dc: example |
| | | objectClass: domain |
| | |
| | | attribute is defined by the server configuration, which is not |
| | | replicated.</para> |
| | | |
| | | <screen width="80">$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password \ |
| | | <screen>$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password \ |
| | | > create-virtual-attribute --name "Served By Description" \ |
| | | > --type user-defined --set enabled:true \ |
| | | > --set attribute-type:description --set base-dn:dc=example,dc=com \ |
| | |
| | | you can define attributes that specify services available for a user |
| | | depending on that user's service level.</para> |
| | | |
| | | <example> |
| | | <title>Collective Attributes: Class of Service</title> |
| | | |
| | | <note> |
| | | <para>This example depends on the <literal>cos</literal> object class, |
| | | and the <literal>classOfService</literal> attribute type defined but |
| | | <para>The following example depends on the <literal>cos</literal> object |
| | | class, and the <literal>classOfService</literal> attribute type defined but |
| | | commented out in the <link xlink:href="http://mcraig.org/ldif/Example.ldif" |
| | | >Example.ldif</link> file imported as sample data. To try this example |
| | | for yourself, add the attribute type and object class definitions |
| | |
| | | and adjust the definition of the <literal>cos</literal> object class to |
| | | allow the two quota attributes.</para> |
| | | |
| | | <screen width="80">$ cat quotas.ldif |
| | | <screen>$ cat quotas.ldif |
| | | dn: cn=schema |
| | | changetype: modify |
| | | add: attributeTypes |
| | |
| | | <para>Use the following collective attribute definitions to set the quotas |
| | | depending on class of service.</para> |
| | | |
| | | <programlisting language="ldif" width="80"># cos.ldif: quotas by class of service |
| | | <programlisting language="ldif"># cos.ldif: quotas by class of service |
| | | dn: cn=Bronze Class of Service,dc=example,dc=com |
| | | objectClass: collectiveAttributeSubentry |
| | | objectClass: extensibleObject |
| | |
| | | <para>You can add the collective attribute subentries by using the |
| | | <command>ldapmodify</command> command.</para> |
| | | |
| | | <screen width="80">$ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -a -f cos.ldif |
| | | <screen>$ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -a -f cos.ldif |
| | | Processing ADD request for cn=Bronze Class of Service,dc=example,dc=com |
| | | ADD operation successful for DN cn=Bronze Class of Service,dc=example,dc=com |
| | | Processing ADD request for cn=Silver Class of Service,dc=example,dc=com |
| | |
| | | <para>With the collective attributes defined, you can see the results on |
| | | user entries.</para> |
| | | |
| | | <screen width="80">$ ldapsearch -p 1389 -b dc=example,dc=com uid=bjensen \ |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com uid=bjensen \ |
| | | > classOfService mailQuota diskQuota |
| | | dn: uid=bjensen,ou=People,dc=example,dc=com |
| | | mailQuota: 1 GB |
| | |
| | | mailQuota: 10 GB |
| | | classOfService: gold |
| | | diskQuota: 100 GB</screen> |
| | | </example> |
| | | </section> |
| | | </chapter> |
| | |
| | | xmlns:xinclude='http://www.w3.org/2001/XInclude'> |
| | | <title>Authenticating To the Directory</title> |
| | | |
| | | <para>TODO</para> |
| | | <para>When your client application connects to the directory, the first |
| | | operation to perform is a bind operation. The bind operation authenticates |
| | | the client to the directory.</para> |
| | | |
| | | <section> |
| | | <title>Simple Authentication</title> |
| | | |
| | | <para>TODO</para> |
| | | <para>You perform simple authentication by binding with the distinguished |
| | | name of a user's directory entry and the user's password. For this reason |
| | | simple authentication over unsecure network connections should be done only |
| | | in the lab. If your real end users are providing their passwords, your |
| | | application must use simple authentication only if the network is |
| | | secure.</para> |
| | | |
| | | <para>To bind using Barbara Jensen's identity and simple authentication, |
| | | for example, your application would provide the DN |
| | | <literal>uid=bjensen,ou=People,dc=example,dc=com</literal> with the |
| | | password <literal>hifalutin</literal>.</para> |
| | | |
| | | <para>The directory stores the password value used for simple authentication |
| | | in binary form on the <literal>userPassword</literal> attribute of the entry. |
| | | In other words, for the purposes of your application the password is not a |
| | | string, but instead an array of bytes. Typically the directory is further |
| | | configured to store only hashed values of user passwords, rather than plain |
| | | text versions. Thus even if someone managed to read the stored password |
| | | values, they would still have to crack the hash in order to learn the |
| | | actual passwords. When your application performing simple authentication |
| | | sends the password value, the directory server therefore hashes the password |
| | | value, and then compares the hashed result with the value of the |
| | | <literal>userPassword</literal> on the user entry. If the values match, |
| | | then the directory authenticates the user. Once the user has authenticated, |
| | | the directory determines authorization for operations on the connection |
| | | based on the users identity.</para> |
| | | |
| | | <programlisting language="java">// LDAP simple authentication |
| | | |
| | | final LDAPConnectionFactory factory = new LDAPConnectionFactory( |
| | | hostName, port); |
| | | Connection connection = null; |
| | | |
| | | try |
| | | { |
| | | connection = factory.getConnection(); |
| | | connection.bind(userName, password.toCharArray()); |
| | | |
| | | System.out.println("Authenticated as " + userName + "."); |
| | | |
| | | // Perform LDAP operations here. |
| | | } |
| | | |
| | | // Catch any exceptions here, and then close the connection. |
| | | |
| | | finally |
| | | { |
| | | if (connection != null) |
| | | { |
| | | connection.close(); |
| | | } |
| | | }</programlisting> |
| | | |
| | | <para>If the password values do not match, a directory might nevertheless |
| | | authenticate the client application. The LDAP specifications say that in this |
| | | case, however, the directory authenticates the user as anonymous, therefore |
| | | no doubt with fewer rights than the normal user, and surely fewer rights |
| | | than an administrator.</para> |
| | | </section> |
| | | |
| | | <section> |
| | |
| | | |
| | | <para>You can either install a build or build your own from source.</para> |
| | | |
| | | <task xml:id='install-stable-sdk'> |
| | | <title>To Install the Latest Stable OpenDJ LDAP SDK</title> |
| | | |
| | | <taskprerequisites> |
| | | <para>Before you either download a build of OpenDJ LDAP SDK, or get the |
| | | source code to build your own SDK, make sure you have a Java Development Kit |
| | | installed. OpenDJ LDAP SDK relies on Java 6 or later. You can check for |
| | | Java 6 by running the following command.</para> |
| | | <para>Before you either download a build of OpenDJ LDAP SDK, or get the |
| | | source code to build your own SDK, make sure you have a Java Development Kit |
| | | installed. OpenDJ LDAP SDK relies on Java 6 or later. You can check for |
| | | Java 6 by running the following command.</para> |
| | | |
| | | <screen width="80">$ java -version |
| | | <screen>$ java -version |
| | | java version "1.6.0_24" |
| | | Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-9M3326) |
| | | Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode)</screen> |
| | | </taskprerequisites> |
| | | |
| | | <procedure> |
| | | <step> |
| | | <para>Download the <link |
| | | xlink:href='http://builds.forgerock.org/job/OpenDJ3/lastStableBuild/org.forgerock.opendj$opendj-ldap-toolkit/artifact/org.forgerock.opendj/opendj-ldap-toolkit/3.0.0-SNAPSHOT/opendj-ldap-toolkit-3.0.0-SNAPSHOT.zip' |
| | | >latest stable OpenDJ LDAP SDK and tools bundle</link>.</para> |
| | | <procedure xml:id="install-stable-sdk"> |
| | | <title>To Install the Latest Stable SDK</title> |
| | | <step> |
| | | <para>Download the <link |
| | | xlink:href='http://builds.forgerock.org/job/OpenDJ3/lastStableBuild/org.forgerock.opendj$opendj-ldap-toolkit/artifact/org.forgerock.opendj/opendj-ldap-toolkit/3.0.0-SNAPSHOT/opendj-ldap-toolkit-3.0.0-SNAPSHOT.zip' |
| | | >latest stable OpenDJ LDAP SDK and tools bundle</link>.</para> |
| | | </step> |
| | | <step> |
| | | <para>Download the <link |
| | | xlink:href='http://builds.forgerock.org/job/OpenDJ3/lastStableBuild/org.forgerock.opendj$opendj-ldap-sdk/artifact/org.forgerock.opendj/opendj-ldap-sdk/3.0.0-SNAPSHOT/opendj-ldap-sdk-3.0.0-SNAPSHOT-javadoc.jar' |
| | | >latest stable version of the OpenDJ LDAP SDK documentation</link> |
| | | (javadoc).</para> |
| | | </step> |
| | | <step> |
| | | <para>Unzip the bundle, <filename>opendj-ldap-toolkit-<?eval |
| | | ${project.version} ?>.zip</filename>, where you want to install the |
| | | SDK.</para> |
| | | <screen>$ unzip opendj-ldap-toolkit-<?eval ${project.version} ?>.zip</screen> |
| | | </step> |
| | | <step> |
| | | <para>Unpack the OpenDJ LDAP SDK documentation, <filename>opendj-ldap-sdk-<?eval |
| | | ${project.version} ?>-javadoc.jar</filename>, under the SDK install |
| | | directory.</para> |
| | | <screen>$ mkdir opendj-ldap-toolkit-<?eval ${project.version} ?>/javadoc |
| | | $ cd opendj-ldap-toolkit-<?eval ${project.version} ?>/javadoc |
| | | $ jar -xf /path/to/opendj-ldap-sdk-<?eval ${project.version} ?>-javadoc.jar</screen> |
| | | </step> |
| | | <step> |
| | | <para>Download the <link |
| | | xlink:href='http://builds.forgerock.org/job/OpenDJ3/lastStableBuild/org.forgerock.opendj$opendj-ldap-sdk/artifact/org.forgerock.opendj/opendj-ldap-sdk/3.0.0-SNAPSHOT/opendj-ldap-sdk-3.0.0-SNAPSHOT-javadoc.jar' |
| | | >latest stable version of the OpenDJ LDAP SDK documentation</link> |
| | | (javadoc).</para> |
| | | <para>Add the tools to your PATH.</para> |
| | | <screen>(UNIX) |
| | | $ export PATH=/path/to/opendj-ldap-toolkit-<?eval ${project.version} ?>/bin:$PATH</screen> |
| | | <screen>(Windows) |
| | | C:\>set PATH=\\path\to\opendj-ldap-toolkit-<?eval ${project.version} ?>\bat:%PATH%</screen> |
| | | </step> |
| | | <step> |
| | | <para>Unzip the bundle, <filename>opendj-ldap-toolkit-<?eval |
| | | ${project.version} ?>.zip</filename>, where you want to install the |
| | | SDK.</para> |
| | | <screen width="80">$ unzip opendj-ldap-toolkit-<?eval ${project.version} ?>.zip</screen> |
| | | </step> |
| | | <step> |
| | | <para>Unpack the OpenDJ LDAP SDK documentation, <filename>opendj-ldap-sdk-<?eval |
| | | ${project.version} ?>-javadoc.jar</filename>, under the SDK install |
| | | directory.</para> |
| | | <screen width="80">$ mkdir opendj-ldap-toolkit-<?eval ${project.version} ?>/javadoc |
| | | $ cd opendj-ldap-toolkit-<?eval ${project.version} ?>/javadoc |
| | | $ jar -xf /path/to/opendj-ldap-sdk-<?eval ${project.version} ?>-javadoc.jar</screen> |
| | | </step> |
| | | <step> |
| | | <para>Add the tools to your PATH.</para> |
| | | <screen width="80">(UNIX) |
| | | $ export PATH=/path/to/opendj-ldap-toolkit-<?eval ${project.version} ?>/bin:$PATH</screen> |
| | | <screen width="80">(Windows) |
| | | C:\>set PATH=\\path\to\opendj-ldap-toolkit-<?eval ${project.version} ?>\bat:%PATH%</screen> |
| | | </step> |
| | | <step> |
| | | <para> Add the OpenDJ LDAP SDK for the APIs,the I18N core library and Grizzly framework for the |
| | | transport to your CLASSPATH, typically found under |
| | | <filename>opendj-ldap-toolkit-<?eval ${project.version} |
| | | <para> Add the OpenDJ LDAP SDK for the APIs,the I18N core library and Grizzly framework for the |
| | | transport to your CLASSPATH, typically found under |
| | | <filename>opendj-ldap-toolkit-<?eval ${project.version} |
| | | ?>/lib/</filename>.</para> |
| | | <screen width="80">(UNIX) |
| | | $ export CLASSPATH=/path/to/lib/grizzly-framework-2.1.1.jar:$CLASSPATH |
| | | $ export CLASSPATH=/path/to/lib/i18n-core-1.2.0.jar:$CLASSPATH |
| | | $ export CLASSPATH=/path/to/lib/opendj-ldap-sdk-<?eval ${project.version} ?>.jar:$CLASSPATH |
| | | </screen> |
| | | <screen width="80">(Windows) |
| | | C:\>set CLASSPATH=\\path\to\lib\grizzly-framework-2.1.1.jar:%CLASSPATH% |
| | | C:\>set CLASSPATH=\\path\to\lib\i18n-core-1.2.0.jar:%CLASSPATH% |
| | | C:\>set CLASSPATH=\\path\to\lib\opendj-ldap-sdk-<?eval ${project.version} ?>.jar:%CLASSPATH%</screen> |
| | | </step> |
| | | </procedure> |
| | | </task> |
| | | <screen>(UNIX) |
| | | $ export CLASSPATH=/path/to/lib/grizzly-framework-2.1.1.jar:$CLASSPATH |
| | | $ export CLASSPATH=/path/to/lib/i18n-core-1.2.0.jar:$CLASSPATH |
| | | $ export CLASSPATH=/path/to/lib/opendj-ldap-sdk-<?eval ${project.version} ?>.jar:$CLASSPATH |
| | | </screen> |
| | | <screen>(Windows) |
| | | C:\>set CLASSPATH=\\path\to\lib\grizzly-framework-2.1.1.jar:%CLASSPATH% |
| | | C:\>set CLASSPATH=\\path\to\lib\i18n-core-1.2.0.jar:%CLASSPATH% |
| | | C:\>set CLASSPATH=\\path\to\lib\opendj-ldap-sdk-<?eval ${project.version} ?>.jar:%CLASSPATH%</screen> |
| | | </step> |
| | | </procedure> |
| | | |
| | | <task> |
| | | <title>To Build Your Own SDK From Source</title> |
| | | |
| | | <taskprerequisites> |
| | | <para>Before you either download a build of OpenDJ LDAP SDK, or get the source |
| | | code to build your own SDK, make sure you have a Java Development Kit |
| | | installed. OpenDJ LDAP SDK relies on Java 6 or later. You can check for Java 6 |
| | | by running the following command.</para> |
| | | |
| | | <screen width="80">$ java -version |
| | | java version "1.6.0_24" |
| | | Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-9M3326) |
| | | Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode)</screen> |
| | | |
| | | <para>Also make sure you have Subversion (<command>svn</command>) and |
| | | <procedure xml:id="proc-roll-your-own-sdk"> |
| | | <title>To Build Your Own SDK From Source</title> |
| | | <step> |
| | | <para>Make sure you have Subversion (<command>svn</command>) and |
| | | Maven (<command>mvn</command>) installed.</para> |
| | | </taskprerequisites> |
| | | |
| | | <procedure xml:id='proc-roll-your-own-sdk'> |
| | | <step> |
| | | <para>Check out the source code.</para> |
| | | <screen width="80">$ svn co https://svn.forgerock.org/opendj/trunk/opendj3 |
| | | </step> |
| | | <step> |
| | | <para>Check out the source code.</para> |
| | | <screen>$ svn co https://svn.forgerock.org/opendj/trunk/opendj3 |
| | | Error validating server certificate for 'https://svn.forgerock.org:443': |
| | | - The certificate is not issued by a trusted authority. Use the |
| | | fingerprint to validate the certificate manually! |
| | |
| | | (R)eject, accept (t)emporarily or accept (p)ermanently? p |
| | | ... |
| | | A opendj3/README |
| | | U opendj3 |
| | | U opendj3 |
| | | ... |
| | | Checked out revision 6985.</screen> |
| | | </step> |
| | | <step> |
| | | <para> |
| | | Build the modules and install them in the local repository. |
| | | </para> |
| | | <screen width="80">$ cd opendj3/ |
| | | </step> |
| | | <step> |
| | | <para>Build the modules and install them in the local repository.</para> |
| | | <screen>$ cd opendj3/ |
| | | $ mvn install |
| | | [INFO] Scanning for projects... |
| | | [INFO] ------------------------------------------------------------------------ |
| | |
| | | [INFO] Finished at: Wed Jun 08 09:19:57 CEST 2011 |
| | | [INFO] Final Memory: 27M/87M |
| | | [INFO] ------------------------------------------------------------------------</screen> |
| | | </step> |
| | | <step> |
| | | <para>Unzip the tools and libraries included in the file, |
| | | <filename>opendj3/opendj-ldap-toolkit/target/opendj-ldap-toolkit-<?eval |
| | | ${project.version} ?>.zip</filename>.</para> |
| | | </step> |
| | | <step> |
| | | <para>Add the <filename>opendj-ldap-toolkit-<?eval ${project.version} |
| | | ?>/bin</filename> (UNIX) or <filename>opendj-ldap-toolkit-<?eval |
| | | ${project.version} ?>\bat</filename> (Windows) directory to your |
| | | PATH.</para> |
| | | </step> |
| | | <step> |
| | | <para>Set your CLASSPATH to include the OpenDJ LDAP SDK library, |
| | | <filename>opendj-ldap-sdk-<?eval ${project.version} ?>.jar</filename>, |
| | | the I18N core library, <filename>i18n-core-1.2.0.jar</filename>, and the Grizzly |
| | | framework, <filename>grizzly-framework-2.1.1.jar</filename>, |
| | | under <filename>opendj-ldap-toolkit-<?eval ${project.version} ?>/lib/</filename>.</para> |
| | | </step> |
| | | <step> |
| | | <para>Find the OpenDJ LDAP SDK documentation under <link |
| | | xlink:href='file:///path/to/opendj3/opendj-ldap-sdk/target/apidocs/index.html' |
| | | >file:///path/to/opendj3/opendj-ldap-sdk/target/apidocs/index.html</link>.</para> |
| | | </step> |
| | | </procedure> |
| | | </task> |
| | | </step> |
| | | <step> |
| | | <para>Unzip the tools and libraries included in the file, |
| | | <filename>opendj3/opendj-ldap-toolkit/target/opendj-ldap-toolkit-<?eval |
| | | ${project.version} ?>.zip</filename>.</para> |
| | | </step> |
| | | <step> |
| | | <para>Add the <filename>opendj-ldap-toolkit-<?eval ${project.version}?>/bin</filename> |
| | | (UNIX) or <filename>opendj-ldap-toolkit-<?eval |
| | | ${project.version} ?>\bat</filename> (Windows) directory to your |
| | | PATH.</para> |
| | | </step> |
| | | <step> |
| | | <para>Set your CLASSPATH to include the OpenDJ LDAP SDK library, |
| | | <filename>opendj-ldap-sdk-<?eval ${project.version} ?>.jar</filename>, |
| | | the I18N core library, <filename>i18n-core-1.2.0.jar</filename>, and the Grizzly |
| | | framework, <filename>grizzly-framework-2.1.1.jar</filename>, |
| | | under <filename>opendj-ldap-toolkit-<?eval ${project.version} ?>/lib/</filename>.</para> |
| | | </step> |
| | | <step> |
| | | <para>Find the OpenDJ LDAP SDK documentation under <link |
| | | xlink:href='file:///path/to/opendj3/opendj-ldap-sdk/target/apidocs/index.html' |
| | | >file:///path/to/opendj3/opendj-ldap-sdk/target/apidocs/index.html</link>.</para> |
| | | </step> |
| | | </procedure> |
| | | |
| | | <para>After you install OpenDJ LDAP SDK and configure your environment as |
| | | described, if you have a directory server running import sample data, |
| | | and test your configuration with a sample client application.</para> |
| | | |
| | | <programlisting width="80">// Test.java: |
| | | <programlisting>// Test.java: |
| | | // Kick the SDK tires, reading Babs Jensen's entry and displaying LDIF. |
| | | // If your LDAP server is not listening on localhost:1389, or if your |
| | | // data are different change the appropriate lines below. |
| | |
| | | <para>If all goes well, <filename>Test.java</filename> compiles without |
| | | errors. The test program displays Babs Jensen's entry in LDIF.</para> |
| | | |
| | | <screen width="80">$ javac Test.java |
| | | <screen>$ javac Test.java |
| | | $ java Test |
| | | # Search result entry: uid=bjensen,ou=People,dc=example,dc=com |
| | | dn: uid=bjensen,ou=People,dc=example,dc=com |
| | |
| | | mail: bjensen@example.com |
| | | facsimileTelephoneNumber: +1 408 555 1992</screen> |
| | | </section> |
| | | |
| | | </chapter> |
| | | |
| | |
| | | xmlns:xinclude='http://www.w3.org/2001/XInclude'> |
| | | <title>Searching & Comparing Directory Data</title> |
| | | |
| | | <para>TODO</para> |
| | | <para>Traditionally directories excel at serving read requests. This chapter |
| | | covers the read (search and compare) capabilities that OpenDJ LDAP Java SDK |
| | | provides. The data used in examples here is |
| | | <link xlink:href="http://mcraig.org/ldif/Example.ldif">available |
| | | online</link>.</para> |
| | | |
| | | <section> |
| | | <title>Search Objects & Methods</title> |
| | |
| | | <step> |
| | | <para>Make sure you have the correct Java environment installed.</para> |
| | | |
| | | <screen width='80'>$ java -version |
| | | <screen>$ java -version |
| | | java version "1.6.0_24" |
| | | Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-9M3326) |
| | | Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode)</screen> |
| | |
| | | GUI installer with your local version of software, as does |
| | | Java WebStart with a remote version of the software.</para> |
| | | |
| | | <screen width='80'>$ /path/to/OpenDJ-<?eval ${project.version}?>/setup --cli |
| | | <screen>$ /path/to/OpenDJ-<?eval ${project.version}?>/setup --cli |
| | | |
| | | OpenDJ <?eval ${project.version}?> |
| | | Please wait while the setup program initializes... |
| | |
| | | <para>Run the <command>status</command> command to make sure your OpenDJ |
| | | server is working as expected.</para> |
| | | |
| | | <screen width='80'>$ /path/to/OpenDJ-<?eval ${project.version}?>/bin/status |
| | | <screen>$ /path/to/OpenDJ-<?eval ${project.version}?>/bin/status |
| | | |
| | | >>>> Specify OpenDJ LDAP connection parameters |
| | | |
| | |
| | | <command>javaws</command> command in a terminal window to start the |
| | | installer.</para> |
| | | |
| | | <screen width='80'>$ export PATH=/path/to/sun-java6/bin:$PATH |
| | | <screen>$ export PATH=/path/to/sun-java6/bin:$PATH |
| | | $ javaws http://www.forgerock.org/downloads/opendj/<?eval ${project.version}?>/install/QuickSetup.jnlp</screen> |
| | | |
| | | <para>The WebStart installer corresponds to what you start if you download |
| | |
| | | <command>uninstall</command> options to specify choices for the options. |
| | | See <command>uninstall --help</command> for more information.</para> |
| | | |
| | | <screen width='80'>$ cd /path/to/OpenDJ-<?eval ${project.version}?> |
| | | <screen>$ cd /path/to/OpenDJ-<?eval ${project.version}?> |
| | | $ ./uninstall --cli |
| | | Do you want to remove all components of the server or select the components to |
| | | remove? |
| | |
| | | <para>If the command output tells you to delete files manually, then remove |
| | | those remaining files to complete the process.</para> |
| | | |
| | | <screen width='80'>$ rm -rf /path/to/OpenDJ-<?eval ${project.version}?></screen> |
| | | <screen>$ rm -rf /path/to/OpenDJ-<?eval ${project.version}?></screen> |
| | | </step> |
| | | </procedure> |
| | | </chapter> |
| | |
| | | >opendj_patch4upgrade.sh</link> to your current server, by |
| | | running the shell script from the directory where the server is installed.</para> |
| | | |
| | | <screen width="80">$ cd /path/to/OpenDJ |
| | | <screen>$ cd /path/to/OpenDJ |
| | | $ sh /downloads/opendj_patch4upgrade.sh |
| | | /path/to/OpenDJ has been patched, you can proceed with the upgrade program now</screen> |
| | | |
| | |
| | | |
| | | <step> |
| | | <para>Download the OpenDJ .zip file.</para> |
| | | <screen width='80'>$ cd /tmp |
| | | <screen>$ cd /tmp |
| | | $ wget http://www.forgerock.org/downloads/opendj/<?eval ${project.version}?>/OpenDJ-<?eval ${project.version}?>.zip</screen> |
| | | </step> |
| | | <step> |
| | | <para>Change to the directory at the root of the server instance.</para> |
| | | <screen width='80'>$ cd /path/to/OpenDJ</screen> |
| | | <screen>$ cd /path/to/OpenDJ</screen> |
| | | </step> |
| | | <step> |
| | | <para>Pass the .zip file name to the <command>upgrade</command> command.</para> |
| | | <screen width='80'>$ ./upgrade -f /tmp/OpenDJ-<?eval ${project.version}?>.zip |
| | | <screen>$ ./upgrade -f /tmp/OpenDJ-<?eval ${project.version}?>.zip |
| | | See /var/....log for a detailed log of this operation. |
| | | |
| | | Initializing Upgrade ..... Done. |
| | |
| | | <command>rebuild-index</command> command to rebuild the |
| | | <literal>dn2id</literal> index for your suffixes.</para> |
| | | |
| | | <screen width='80'>$ ./bin/rebuild-index -i dn2id -b "dc=example,dc=com" |
| | | <screen>$ ./bin/rebuild-index -i dn2id -b "dc=example,dc=com" |
| | | ...Rebuild complete. Processed 160 entries in 0 seconds (average rate 401.0/sec)</screen> |
| | | </step> |
| | | </procedure> |
| | |
| | | <title>Examples</title> |
| | | <para>The following example demonstrates measuring simple bind |
| | | performance.</para> |
| | | <screen width="80">$ authrate -p 1389 -g "rand(names.txt)" \ |
| | | <screen>$ authrate -p 1389 -g "rand(names.txt)" \ |
| | | > -D "uid=%s,ou=people,dc=example,dc=com" -w password -c 10 -f |
| | | ----------------------------------------------------------------- |
| | | Throughput Response Time |
| | |
| | | <refsect1> |
| | | <title>Examples</title> |
| | | <para>The following example backs up all user data on the server.</para> |
| | | <screen width="80">$ backup -p 5444 -D "cn=Directory Manager" -w password \ |
| | | <screen>$ backup -p 5444 -D "cn=Directory Manager" -w password \ |
| | | > -a -d /path/to/OpenDJ/bak -t 0 |
| | | Backup task 20110613143801866 scheduled to start Jun 13, 2011 2:38:01 PM CEST</screen> |
| | | |
| | | <para>The following example schedules back up of all user data every night at |
| | | 2 AM, and notifies diradmin@example.com when finished, or on error.</para> |
| | | <screen width="80">$ backup -p 5444 -D "cn=Directory Manager" -w password -a \ |
| | | <screen>$ backup -p 5444 -D "cn=Directory Manager" -w password -a \ |
| | | > -d /path/to/OpenDJ/bak --recurringTask "00 02 * * *" \ |
| | | > --completionNotify diradmin@example.com --errorNotify diradmin@example.com |
| | | Recurring Backup task BackupTask-988d6adf-4d65-44bf-8546-6ea74a2480b0 |
| | |
| | | <title>Examples</title> |
| | | <para>The following command shows the changes from the external change log |
| | | in human-readable format.</para> |
| | | <screen width="80">$ base64 decode -d YWRkOiBkZXNjcmlwdGlvbgpkZXNjcmlwdGlvbjogQSB0aGlyZCBjaGFuZ2UK |
| | | <screen>$ base64 decode -d YWRkOiBkZXNjcmlwdGlvbgpkZXNjcmlwdGlvbjogQSB0aGlyZCBjaGFuZ2UK |
| | | LQpyZXBsYWNlOiBtb2RpZmllcnNOYW1lCm1vZGlmaWVyc05hbWU6IGNuPURpcmVjdG9yeSBNYW5hZ2V |
| | | yLGNuPVJvb3QgRE5zLGNuPWNvbmZpZwotCnJlcGxhY2U6IG1vZGlmeVRpbWVzdGFtcAptb2RpZnlUaW |
| | | 1lc3RhbXA6IDIwMTEwNjEzMDcxMjEwWgotCg== |
| | |
| | | <title>Examples</title> |
| | | <para>The following example starts the Control Panel on a remote host.</para> |
| | | |
| | | <screen width="80">$ control-panel -r -h opendj.example.com -p 4444 &</screen> |
| | | <screen>$ control-panel -r -h opendj.example.com -p 4444 &</screen> |
| | | </refsect1> |
| | | </refentry> |
| | |
| | | <para>The following example adds a script to start OpenDJ at boot time |
| | | on a Debian-based system, and then updates the runlevel system to use the |
| | | script.</para> |
| | | <screen width="80">$ sudo create-rc-script -f /etc/init.d/opendj -u mark |
| | | <screen>$ sudo create-rc-script -f /etc/init.d/opendj -u mark |
| | | $ sudo update-rc.d opendj</screen> |
| | | </refsect1> |
| | | </refentry> |
| | |
| | | <title>Examples</title> |
| | | <para>The following example displays debugging information about the |
| | | equality index for <literal>sudoUser</literal>.</para> |
| | | <screen width="80">$ dbtest dump-database-container -n userRoot -b dc=example,dc=com \ |
| | | <screen>$ dbtest dump-database-container -n userRoot -b dc=example,dc=com \ |
| | | > -d sudoUser.equality |
| | | Indexed Value (6 bytes): %admin |
| | | Entry ID List (8 bytes): 165 |
| | |
| | | <title>Examples</title> |
| | | <para>The following example starts <command>dsconfig</command> in interactive, |
| | | menu-driven mode on the default port of the current host.</para> |
| | | <screen width="80">$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password |
| | | <screen>$ dsconfig -h `hostname` -p 4444 -D "cn=Directory Manager" -w password |
| | | |
| | | >>>> OpenDS configuration console main menu |
| | | |
| | |
| | | <refsect1> |
| | | <title>Examples</title> |
| | | <para>This example lists server properties.</para> |
| | | <screen width="80"> |
| | | <screen> |
| | | $ dsframework -p 4444 -h `hostname` -D "cn=Directory Manager" -w password -X \ |
| | | > list-server-properties |
| | | Option Types: |
| | |
| | | </refsect1> |
| | | <refsect1> |
| | | <title>Examples</title> |
| | | <screen width="80">$ dsjavaproperties |
| | | <screen>$ dsjavaproperties |
| | | The operation was successful. The server commands will use the java arguments |
| | | and java home specified in the properties file located in |
| | | /path/to/OpenDJ/config/java.properties</screen> |
| | |
| | | for a new replica whose admin port is 5444 from an existing replica |
| | | whose admin port is 4444.</para> |
| | | |
| | | <screen width="80">$ dsreplication enable -I admin -w password -X -n -b dc=example,dc=com \ |
| | | <screen>$ dsreplication enable -I admin -w password -X -n -b dc=example,dc=com \ |
| | | > --host1 `hostname` --port1 4444 --bindDN1 "cn=Directory Manager" \ |
| | | > --bindPassword1 password --replicationPort1 8989 \ |
| | | > --host2 `hostname` --port2 5444 --bindDN2 "cn=Directory Manager" \ |
| | |
| | | <title>Examples</title> |
| | | <para>The following example encodes a password, and also shows comparison |
| | | of a password with the encoded value.</para> |
| | | <screen width="80">$ encode-password -l |
| | | <screen>$ encode-password -l |
| | | 3DES |
| | | AES |
| | | BASE64 |
| | |
| | | <title>Examples</title> |
| | | <para>The following example exports data to a file, |
| | | <filename>Example.ldif</filename>, with the server offline.</para> |
| | | <screen width="80">$ export-ldif -b dc=example,dc=com -n userRoot -l ../ldif/Example.ldif |
| | | <screen>$ export-ldif -b dc=example,dc=com -n userRoot -l ../ldif/Example.ldif |
| | | [21/Jun/2011:13:40:49 +0200] category=BACKEND severity=INFORMATION ... |
| | | ...Exported 160 entries and skipped 0 in 0 seconds (average rate 1428.6/sec)</screen> |
| | | </refsect1> |
| | |
| | | <title>Examples</title> |
| | | <para>The following example imports the content of the LDIF file, |
| | | <filename>Example.ldif</filename>, with the server offline.</para> |
| | | <screen width="80"> |
| | | <screen> |
| | | $ import-ldif -b dc=example,dc=com -n userRoot -l /path/to/Example.ldif |
| | | [21/Jun/2011:13:38:03 +0200] category=RUNTIME_INFORMATION severity=NOTICE... |
| | | ... msg=Import LDIF environment close took 0 seconds</screen> |
| | |
| | | <title>Examples</title> |
| | | <para>The following examples demonstrate comparing Babs Jensen's UID.</para> |
| | | <para>The following example uses a matching UID value.</para> |
| | | <screen width="80">$ ldapcompare -p 1389 uid:bjensen uid=bjensen,ou=people,dc=example,dc=com |
| | | <screen>$ ldapcompare -p 1389 uid:bjensen uid=bjensen,ou=people,dc=example,dc=com |
| | | Comparing type uid with value bjensen in entry |
| | | uid=bjensen,ou=people,dc=example,dc=com |
| | | Compare operation returned true for entry |
| | | uid=bjensen,ou=people,dc=example,dc=com</screen> |
| | | <para>The following example uses a UID value that does not match.</para> |
| | | <screen width="80">$ ldapcompare -p 1389 uid:beavis uid=bjensen,ou=people,dc=example,dc=com |
| | | <screen>$ ldapcompare -p 1389 uid:beavis uid=bjensen,ou=people,dc=example,dc=com |
| | | Comparing type uid with value beavis in entry |
| | | uid=bjensen,ou=people,dc=example,dc=com |
| | | Compare operation returned false for entry |
| | |
| | | <refsect1> |
| | | <title>Examples</title> |
| | | <para>The following command deletes a user entry from the directory.</para> |
| | | <screen width="80">$ ldapdelete -p 1389 -D "cn=Directory Manager" -w password \ |
| | | <screen>$ ldapdelete -p 1389 -D "cn=Directory Manager" -w password \ |
| | | > uid=bjensen,ou=people,dc=example,dc=com |
| | | Processing DELETE request for uid=bjensen,ou=people,dc=example,dc=com |
| | | DELETE operation successful for DN uid=bjensen,ou=people,dc=example,dc=com</screen> |
| | | <para>The following command deletes the ou=Groups entry and all entries |
| | | underneath ou=Groups.</para> |
| | | <screen width="80">$ ldapdelete -p 1389 -D "cn=Directory Manager" -w password -x \ |
| | | <screen>$ ldapdelete -p 1389 -D "cn=Directory Manager" -w password -x \ |
| | | > Processing DELETE request for ou=groups,dc=example,dc=com |
| | | DELETE operation successful for DN ou=groups,dc=example,dc=com</screen> |
| | | </refsect1> |
| | |
| | | <title>Examples</title> |
| | | <para>The following example demonstrates use of the command to add an entry |
| | | to the directory.</para> |
| | | <screen width="80">$ cat newuser.ldif |
| | | <screen>$ cat newuser.ldif |
| | | dn: uid=newuser,ou=People,dc=example,dc=com |
| | | uid: newuser |
| | | facsimileTelephoneNumber: +1 408 555 1213 |
| | |
| | | |
| | | <para>The following example demonstrates adding a Description attribute |
| | | to the new user's entry.</para> |
| | | <screen width="80">$ cat newdesc.ldif |
| | | <screen>$ cat newdesc.ldif |
| | | dn: uid=newuser,ou=People,dc=example,dc=com |
| | | changetype: modify |
| | | add: description |
| | |
| | | |
| | | <para>The following example demonstrates changing the Description attribute |
| | | for the new user's entry.</para> |
| | | <screen width="80">$ cat moddesc.ldif |
| | | <screen>$ cat moddesc.ldif |
| | | dn: uid=newuser,ou=People,dc=example,dc=com |
| | | changetype: modify |
| | | replace: description |
| | |
| | | MODIFY operation successful for DN uid=newuser,ou=People,dc=example,dc=com</screen> |
| | | |
| | | <para>The following example demonstrates deleting the new user's entry.</para> |
| | | <screen width="80">$ cat deluser.ldif |
| | | <screen>$ cat deluser.ldif |
| | | dn: uid=newuser,ou=People,dc=example,dc=com |
| | | changetype: delete |
| | | |
| | |
| | | <title>Examples</title> |
| | | <para>The following example demonstrates a user changing the password |
| | | for her entry.</para> |
| | | <screen width="80">$ cat /tmp/currpwd.txt /tmp/newpwd.txt |
| | | <screen>$ cat /tmp/currpwd.txt /tmp/newpwd.txt |
| | | bribery |
| | | secret12 |
| | | $ ldappasswordmodify -p 1389 -C /tmp/currpwd.txt -F /tmp/newpwd.txt \ |
| | |
| | | <title>Examples</title> |
| | | <para>The following example searches for entries with UID containing |
| | | <literal>jensen</literal>, returning only DNs and uid values.</para> |
| | | <screen width="80">$ ldapsearch -p 1389 -b dc=example,dc=com "(uid=*jensen*)" uid |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com "(uid=*jensen*)" uid |
| | | dn: uid=ajensen,ou=People,dc=example,dc=com |
| | | uid: ajensen |
| | | |
| | |
| | | <title>Examples</title> |
| | | <para>The following example demonstrates use of the command with two |
| | | small LDIF files.</para> |
| | | <screen width="80">$ cat /path/to/newuser.ldif |
| | | <screen>$ cat /path/to/newuser.ldif |
| | | dn: uid=newuser,ou=People,dc=example,dc=com |
| | | uid: newuser |
| | | objectClass: person |
| | |
| | | <refsect1> |
| | | <title>Examples</title> |
| | | <para>The following example demonstrates use of the command.</para> |
| | | <screen width="80">$ cat /path/to/newuser.ldif |
| | | <screen>$ cat /path/to/newuser.ldif |
| | | dn: uid=newuser,ou=People,dc=example,dc=com |
| | | uid: newuser |
| | | objectClass: person |
| | |
| | | <refsect1> |
| | | <title>Examples</title> |
| | | <para>The following example demonstrates use of the command.</para> |
| | | <screen width="80">$ ldifsearch -l /path/to/Example.ldif -b dc=example,dc=com uid=bjensen |
| | | <screen>$ ldifsearch -l /path/to/Example.ldif -b dc=example,dc=com uid=bjensen |
| | | dn: uid=bjensen,ou=People,dc=example,dc=com |
| | | objectClass: person |
| | | objectClass: organizationalPerson |
| | |
| | | </refsect1> |
| | | <refsect1> |
| | | <title>Examples</title> |
| | | <screen width="80">$ list-backends |
| | | <screen>$ list-backends |
| | | Backend ID : Base DN |
| | | -------------------:---------------------- |
| | | adminRoot : cn=admin data |
| | |
| | | <refsect1> |
| | | <title>Examples</title> |
| | | <para>The following example uses the default template to generate LDIF.</para> |
| | | <screen width="80">$ make-ldif -t ../config/MakeLDIF/example.template -o ../ldif/generated.ldif |
| | | <screen>$ make-ldif -t ../config/MakeLDIF/example.template -o ../ldif/generated.ldif |
| | | Processed 1000 entries |
| | | Processed 2000 entries |
| | | ... |
| | |
| | | version 3.0;acl "Admins can run amok"; allow(all) groupdn = |
| | | "ldap:///cn=Directory Administrators,ou=Groups,dc=example,dc=com";)</literallayout> |
| | | <para>The following command locks a user account.</para> |
| | | <screen width="80">$ manage-account -p 4444 -D "uid=kvaughan,ou=people,dc=example,dc=com" \ |
| | | <screen>$ manage-account -p 4444 -D "uid=kvaughan,ou=people,dc=example,dc=com" \ |
| | | > -w bribery set-account-is-disabled -O true \ |
| | | > -b uid=bjensen,ou=people,dc=example,dc=com -X |
| | | Account Is Disabled: true</screen> |
| | | <para>The following command unlocks a user account.</para> |
| | | <screen width="80">$ manage-account -p 4444 -D "uid=kvaughan,ou=people,dc=example,dc=com" \ |
| | | <screen>$ manage-account -p 4444 -D "uid=kvaughan,ou=people,dc=example,dc=com" \ |
| | | > -w bribery clear-account-is-disabled \ |
| | | > -b uid=bjensen,ou=people,dc=example,dc=com -X |
| | | Account Is Disabled: false</screen> |
| | |
| | | <title>Examples</title> |
| | | <para>The following example demonstrates use of the command with a server |
| | | that does daily backups at 2:00 AM.</para> |
| | | <screen width="80">$ manage-tasks -p 4444 -h `hostname` -D "cn=Directory Manager" -w password -s |
| | | <screen>$ manage-tasks -p 4444 -h `hostname` -D "cn=Directory Manager" -w password -s |
| | | |
| | | ID Type Status |
| | | --------------------------------------------------------------- |
| | |
| | | <para>The following example demonstrates testing directory performance by |
| | | using the modrate command to write random 16-character description values |
| | | to all entries in a sample file.</para> |
| | | <screen width="80">$ grep ^uid: /path/to/Example.ldif | sed -e "s/uid: //" > names.txt |
| | | <screen>$ grep ^uid: /path/to/Example.ldif | sed -e "s/uid: //" > names.txt |
| | | $ modrate -p 1389 -D cn=directory\ manager -w secret12 \ |
| | | > -b "uid=%s,ou=people,dc=example,dc=com" -g "rand(names.txt)" \ |
| | | >"description:%s" -g "randStr(16)" -A -F -c 4 -t 4 |
| | |
| | | <para>The following example schedules a task to start immediately that |
| | | rebuilds the <literal>cn</literal> (common name) index.</para> |
| | | |
| | | <screen width="80">$ rebuild-index -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | <screen>$ rebuild-index -p 4444 -h `hostname` -D "cn=Directory Manager" -w password \ |
| | | > -b dc=example,dc=com -i cn -t 0 |
| | | Rebuild Index task 20110607160349596 scheduled to start Jun 7, 2011 4:03:49 PM</screen> |
| | | </refsect1> |
| | |
| | | <title>Examples</title> |
| | | <para>The following example schedules a restore as a task to begin |
| | | immediately.</para> |
| | | <screen width="80">$ restore -p 5444 -D "cn=Directory Manager" -w password \ |
| | | <screen>$ restore -p 5444 -D "cn=Directory Manager" -w password \ |
| | | > -d /path/to/OpenDJ/bak -I 20110613080032 -t 0 |
| | | Restore task 20110613155052932 scheduled to start Jun 13, 2011 3:50:52 PM CEST</screen> |
| | | </refsect1> |
| | |
| | | <refsect1> |
| | | <title>Examples</title> |
| | | <para>The following example demonstrates measuring search performance.</para> |
| | | <screen width="80">$ grep ^uid: /path/to/Example.ldif | sed -e "s/uid: //" > names.txt |
| | | <screen>$ grep ^uid: /path/to/Example.ldif | sed -e "s/uid: //" > names.txt |
| | | $ searchrate -p 1389 -b dc=example,dc=com \ |
| | | > -g "rand(names.txt)" "(uid=%s)" -A -F -c 4 -t 4 |
| | | ------------------------------------------------------------------------------- |
| | |
| | | <title>Examples</title> |
| | | <para>The following command installs OpenDJ directory server, enabling |
| | | StartTLS and importing 100 example entries without interaction.</para> |
| | | <screen width="80">$ ./OpenDJ/setup --cli -b dc=example,dc=com -d 100 -D "cn=Directory Manager" \ |
| | | <screen>$ ./OpenDJ/setup --cli -b dc=example,dc=com -d 100 -D "cn=Directory Manager" \ |
| | | > -w password -h `hostname` -p 1389 \ |
| | | > --generateSelfSignedCertificate --enableStartTLS -n |
| | | |
| | |
| | | <title>Examples</title> |
| | | <para>The following command starts the server without displaying |
| | | information about the startup process.</para> |
| | | <screen width="80">$ start-ds -Q</screen> |
| | | <screen>$ start-ds -Q</screen> |
| | | </refsect1> |
| | | </refentry> |
| | |
| | | </refsect1> |
| | | <refsect1> |
| | | <title>Examples</title> |
| | | <screen width="80">$ status -D "cn=Directory Manager" -w password |
| | | <screen>$ status -D "cn=Directory Manager" -w password |
| | | |
| | | --- Server Status --- |
| | | Server Run Status: Started |
| | |
| | | <refsect1> |
| | | <title>Examples</title> |
| | | <para>The following example restarts OpenDJ directory server.</para> |
| | | <screen width="80">$ stop-ds --restart |
| | | <screen>$ stop-ds --restart |
| | | Stopping Server... |
| | | |
| | | ...The Directory Server has started successfully</screen> |
| | |
| | | <title>Examples</title> |
| | | <para>The following command removes OpenDJ directory server without |
| | | interaction.</para> |
| | | <screen width="80">$ ./OpenDJ/uninstall -a --cli -I admin -w password -n |
| | | <screen>$ ./OpenDJ/uninstall -a --cli -I admin -w password -n |
| | | |
| | | Stopping Directory Server ..... Done. |
| | | Deleting Files under the Installation Path ..... Done. |
| | |
| | | <refsect1> |
| | | <title>Examples</title> |
| | | <para>The following example demonstrates upgrade without interaction.</para> |
| | | <screen width="80">$ ./OpenDJ/upgrade -f ~/Downloads/OpenDJ-<?eval ${project.version}?>.zip -n |
| | | <screen>$ ./OpenDJ/upgrade -f ~/Downloads/OpenDJ-<?eval ${project.version}?>.zip -n |
| | | See |
| | | /var/.../opends-upgrade-5650414945123366149.log |
| | | for a detailed log of this operation. |
| | |
| | | <para>The following example verifies the <literal>cn</literal> (common |
| | | name) index for completeness and for errors.</para> |
| | | |
| | | <screen width="80">$ verify-index -b dc=example,dc=com -i cn --clean --countErrors |
| | | <screen>$ verify-index -b dc=example,dc=com -i cn --clean --countErrors |
| | | [07/Jun/2011:16:06:50 +0200] category=BACKEND severity=INFORMATION |
| | | msgID=9437595 msg=Local DB backend userRoot does not specify the number of |
| | | lock tables: defaulting to 97 |