Fix for OPENDJ-319: Replace short options with long options throughout examples in the documentation
| | |
| | | replica in a replication topology.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-password-policy-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --policy-name "Default Password Policy" |
| | | --set lockout-failure-count:3 |
| | | --set lockout-duration:5m |
| | | --set lockout-failure-expiration-interval:5m |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | |
| | | <para>Users having the default password policy are then locked out after |
| | | three failed attempts in succession.</para> |
| | | |
| | | <screen>$ ldapsearch |
| | | -p 1389 |
| | | -D "uid=bjensen,ou=people,dc=example,dc=com" |
| | | -w hifalutin |
| | | -b dc=example,dc=com |
| | | --port 1389 |
| | | --bindDN "uid=bjensen,ou=people,dc=example,dc=com" |
| | | --bindPassword hifalutin |
| | | --baseDN dc=example,dc=com |
| | | uid=bjensen |
| | | mail |
| | | dn: uid=bjensen,ou=People,dc=example,dc=com |
| | | mail: bjensen@example.com |
| | | |
| | | $ ldapsearch |
| | | -p 1389 |
| | | -D "uid=bjensen,ou=people,dc=example,dc=com" |
| | | -w fatfngrs |
| | | -b dc=example,dc=com |
| | | --port 1389 |
| | | --bindDN "uid=bjensen,ou=people,dc=example,dc=com" |
| | | --bindPassword fatfngrs |
| | | --baseDN dc=example,dc=com |
| | | uid=bjensen |
| | | mail |
| | | The simple bind attempt failed |
| | | Result Code: 49 (Invalid Credentials) |
| | | $ ldapsearch |
| | | -p 1389 |
| | | -D "uid=bjensen,ou=people,dc=example,dc=com" |
| | | -w fatfngrs |
| | | -b dc=example,dc=com |
| | | --port 1389 |
| | | --bindDN "uid=bjensen,ou=people,dc=example,dc=com" |
| | | --bindPassword fatfngrs |
| | | --baseDN dc=example,dc=com |
| | | uid=bjensen |
| | | mail |
| | | The simple bind attempt failed |
| | | Result Code: 49 (Invalid Credentials) |
| | | $ ldapsearch |
| | | -p 1389 |
| | | -D "uid=bjensen,ou=people,dc=example,dc=com" |
| | | -w fatfngrs |
| | | -b dc=example,dc=com |
| | | --port 1389 |
| | | --bindDN "uid=bjensen,ou=people,dc=example,dc=com" |
| | | --bindPassword fatfngrs |
| | | --baseDN dc=example,dc=com |
| | | uid=bjensen |
| | | mail |
| | | The simple bind attempt failed |
| | | Result Code: 49 (Invalid Credentials) |
| | | $ ldapsearch |
| | | -p 1389 |
| | | -D "uid=bjensen,ou=people,dc=example,dc=com" |
| | | -w hifalutin |
| | | -b dc=example,dc=com |
| | | --port 1389 |
| | | --bindDN "uid=bjensen,ou=people,dc=example,dc=com" |
| | | --bindPassword hifalutin |
| | | --baseDN dc=example,dc=com |
| | | uid=bjensen |
| | | mail |
| | | The simple bind attempt failed |
| | |
| | | <command>manage-account</command> command.</para> |
| | | |
| | | <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 |
| | | --port 4444 |
| | | --bindDN "uid=kvaughan,ou=people,dc=example,dc=com" |
| | | --bindPassword bribery |
| | | --operationValue true |
| | | --targetDN uid=bjensen,ou=people,dc=example,dc=com |
| | | --trustAll |
| | | Account Is Disabled: true</screen> |
| | | </step> |
| | | </procedure> |
| | |
| | | command.</para> |
| | | |
| | | <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 |
| | | --port 4444 |
| | | --bindDN "uid=kvaughan,ou=people,dc=example,dc=com" |
| | | --bindPassword bribery |
| | | --targetDN uid=bjensen,ou=people,dc=example,dc=com |
| | | --trustAll |
| | | Account Is Disabled: false</screen> |
| | | </step> |
| | | </procedure> |
| | |
| | | <step> |
| | | <para>Identify the SMTP server to which OpenDJ sends messages.</para> |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-global-configuration-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --set smtp-server:smtp.example.com |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </step> |
| | | |
| | | <step> |
| | | <para>Set up OpenDJ to be able to mail users about account status.</para> |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-account-status-notification-handler-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --handler-name "SMTP Handler" |
| | | --set enabled:true |
| | | --set email-address-attribute-type:mail |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | <para>Notice that OpenDJ finds the user's mail address on the attribute |
| | | on the user's entry, specified by |
| | | <literal>email-address-attribute-type</literal>.</para> |
| | |
| | | <para>Adjust applicable password policies to use the account status |
| | | notification handler you configured.</para> |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-password-policy-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --policy-name "Default Password Policy" |
| | | --set account-status-notification-handler:"SMTP Handler" |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </step> |
| | | </procedure> |
| | | </section> |
| | |
| | | <para>Set the base DN where <literal>uid</literal> should have unique |
| | | values, and enable the plugin.</para> |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-plugin-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --plugin-name "UID Unique Attribute" |
| | | --set base-dn:ou=people,dc=example,dc=com |
| | | --set enabled:true |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | |
| | | <para>Alternatively, you can specify multiple base DNs for unique values |
| | | across multiple suffixes.</para> |
| | |
| | | uid: bjensen |
| | | |
| | | $ ldapmodify |
| | | -a |
| | | -p 1389 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | -f bjensen.ldif |
| | | --defaultAdd |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --filename bjensen.ldif |
| | | Processing MODIFY request for uid=ajensen,ou=People,dc=example,dc=com |
| | | MODIFY operation failed |
| | | Result Code: 19 (Constraint Violation) |
| | |
| | | <step> |
| | | <para>Set up the plugin configuration for your attribute.</para> |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | create-plugin |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --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> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </step> |
| | | <step> |
| | | <para>Check that the plugin is working correctly.</para> |
| | |
| | | mobile: +1 828 555 1212 |
| | | |
| | | $ ldapmodify |
| | | -a |
| | | -p 1389 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | -f mobile.ldif |
| | | --defaultAdd |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --filename mobile.ldif |
| | | Processing MODIFY request for uid=ajensen,ou=People,dc=example,dc=com |
| | | MODIFY operation successful for DN uid=ajensen,ou=People,dc=example,dc=com |
| | | Processing MODIFY request for uid=bjensen,ou=People,dc=example,dc=com |
| | |
| | | <para>Back up only the database for Example.com, where the data |
| | | is stored in the backend named <literal>userRoot</literal>.</para> |
| | | <screen>$ backup |
| | | -p 5444 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | -n userRoot -d /path/to/OpenDJ/bak |
| | | -t 0 |
| | | --port 5444 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --backendID userRoot |
| | | --backupDirectory /path/to/OpenDJ/bak |
| | | --start 0 |
| | | Backup task 20110613143715983 scheduled to start Jun 13, 2011 2:37:15 PM CEST</screen> |
| | | </step> |
| | | <step> |
| | |
| | | msg=The backend userRoot is now taken offline |
| | | [13/Jun/2011:14:31:00 +0200] category=CORE severity=NOTICE msgID=458955 |
| | | msg=The Directory Server is now stopped |
| | | $ backup -n userRoot -d /path/to/OpenDJ/bak |
| | | $ backup --backendID userRoot -d /path/to/OpenDJ/bak |
| | | [13/Jun/2011:14:33:48 +0200] category=TOOLS severity=NOTICE msgID=10944792 |
| | | msg=Starting backup for backend userRoot |
| | | [13/Jun/2011:14:33:48 +0200] category=JEB severity=NOTICE msgID=8847446 |
| | |
| | | <step> |
| | | <para>Back up all user data on the server.</para> |
| | | <screen>$ backup |
| | | -p 5444 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | -a -d /path/to/OpenDJ/bak |
| | | -t 0 |
| | | --port 5444 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --backUpAll |
| | | --backupDirectory /path/to/OpenDJ/bak |
| | | --start 0 |
| | | Backup task 20110613143801866 scheduled to start Jun 13, 2011 2:38:01 PM CEST</screen> |
| | | </step> |
| | | </stepalternatives> |
| | |
| | | <para>Back up all user data every night at 2 AM, and notify |
| | | diradmin@example.com when finished, or on error.</para> |
| | | <screen>$ backup |
| | | -p 5444 |
| | | -D "cn=Directory Manager" |
| | | -w password -a |
| | | -d /path/to/OpenDJ/bak |
| | | --port 5444 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --backUpAll |
| | | --backupDirectory /path/to/OpenDJ/bak |
| | | --recurringTask "00 02 * * *" |
| | | --completionNotify diradmin@example.com |
| | | --errorNotify diradmin@example.com |
| | |
| | | Has Unsigned Hash: false |
| | | Has Signed Hash: false |
| | | Dependent Upon: none |
| | | $ restore-d /path/to/OpenDJ/bak -I 20110613080032 |
| | | $ restore --backupDirectory /path/to/OpenDJ/bak --backupID 20110613080032 |
| | | [13/Jun/2011:15:47:41 +0200] category=JEB severity=NOTICE msgID=8847445 |
| | | msg=Restored: 00000000.jdb (size 341835) |
| | | $ start-ds |
| | |
| | | <step> |
| | | <para>Schedule the restore as a task to begin immediately.</para> |
| | | <screen>$ restore |
| | | -p 5444 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | -d /path/to/OpenDJ/bak |
| | | -I 20110613080032 |
| | | -t 0 |
| | | --port 5444 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --backupDirectory /path/to/OpenDJ/bak |
| | | --backupID 20110613080032 |
| | | --start 0 |
| | | Restore task 20110613155052932 scheduled to start Jun 13, 2011 3:50:52 PM CEST</screen> |
| | | </step> |
| | | </stepalternatives> |
| | |
| | | <para>Prepare the replica to be restored.</para> |
| | | <screen>$ dsreplication |
| | | pre-external-initialization |
| | | -I admin |
| | | -w password |
| | | -X -n |
| | | -p 5444 |
| | | -b dc=example,dc=com |
| | | --adminUID admin |
| | | --bindPassword password |
| | | --trustAll --no-prompt |
| | | --port 5444 |
| | | --baseDN dc=example,dc=com |
| | | |
| | | Preparing base DN dc=example,dc=com to be initialized externally ..... Done. |
| | | |
| | |
| | | msg=The backend userRoot is now taken offline |
| | | [13/Jun/2011:15:44:06 +0200] category=CORE severity=NOTICE msgID=458955 |
| | | msg=The Directory Server is now stopped |
| | | $ restore -d /path/to/OpenDJ/bak -l |
| | | $ restore --backupDirectory /path/to/OpenDJ/bak --listBackups |
| | | Backup ID: 20110613080032 |
| | | Backup Date: 13/Jun/2011:08:00:45 +0200 |
| | | Is Incremental: false |
| | |
| | | Has Unsigned Hash: false |
| | | Has Signed Hash: false |
| | | Dependent Upon: none |
| | | $ restore -d /path/to/OpenDJ/bak -I 20110613080032 |
| | | $ restore --backupDirectory /path/to/OpenDJ/bak --backupID 20110613080032 |
| | | [13/Jun/2011:15:47:41 +0200] category=JEB severity=NOTICE msgID=8847445 |
| | | msg=Restored: 00000000.jdb (size 341835) |
| | | $ start-ds |
| | |
| | | <para>Reinitialize replication on the replica.</para> |
| | | <screen>$ dsreplication |
| | | post-external-initialization |
| | | -I admin |
| | | -w password |
| | | -X -n |
| | | -p 5444 |
| | | -b dc=example,dc=com |
| | | --adminUID admin |
| | | --bindPassword password |
| | | --port 5444 |
| | | --baseDN dc=example,dc=com |
| | | --trustAll |
| | | --no-prompt |
| | | |
| | | Updating replication information on base DN dc=example,dc=com ..... Done. |
| | | |
| | |
| | | uniqueMember: uid=tmorris,ou=People,dc=example,dc=com |
| | | |
| | | $ ldapmodify |
| | | -p 1389 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | -a |
| | | -f static.ldif |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --defaultAdd |
| | | --filename static.ldif |
| | | Processing ADD request for cn=My Static Group,ou=Groups,dc=example,dc=com |
| | | ADD operation successful for DN cn=My Static Group,ou=Groups,dc=example,dc=com</screen> |
| | | |
| | |
| | | uniqueMember: uid=scarter,ou=People,dc=example,dc=com |
| | | |
| | | $ ldapmodify |
| | | -p 1389 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | -f add2grp.ldif |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --filename add2grp.ldif |
| | | Processing MODIFY request for cn=My Static Group,ou=Groups,dc=example,dc=com |
| | | MODIFY operation successful for DN |
| | | cn=My Static Group,ou=Groups,dc=example,dc=com |
| | | $ ldapsearch |
| | | -p 1389 |
| | | -b dc=example,dc=com |
| | | --port 1389 |
| | | --baseDN dc=example,dc=com |
| | | "(cn=My Static Group)" |
| | | dn: cn=My Static Group,ou=Groups,dc=example,dc=com |
| | | ou: Groups |
| | |
| | | memberURL: ldap:///ou=People,dc=example,dc=com??sub?l=Cupertino |
| | | |
| | | $ ldapmodify |
| | | -p 1389 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | -a |
| | | -f dynamic.ldif |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --defaultAdd |
| | | --filename dynamic.ldif |
| | | Processing ADD request for cn=My Dynamic Group,ou=Groups,dc=example,dc=com |
| | | ADD operation successful for DN cn=My Dynamic Group,ou=Groups,dc=example,dc=com</screen> |
| | | |
| | |
| | | <literal>memberURL</literal> values.</para> |
| | | |
| | | <screen>$ ldapsearch |
| | | -p 1389 |
| | | -b dc=example,dc=com |
| | | --port 1389 |
| | | --baseDN 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: rjensen@example.com |
| | | |
| | | $ ldapmodify |
| | | -p 1389 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | dn: uid=ajensen,ou=People,dc=example,dc=com |
| | | changetype: modify |
| | | replace: l |
| | |
| | | MODIFY operation successful for DN uid=ajensen,ou=People,dc=example,dc=com |
| | | ^D |
| | | $ ldapsearch |
| | | -p 1389 |
| | | -b dc=example,dc=com |
| | | --port 1389 |
| | | --baseDN dc=example,dc=com |
| | | "(&(uid=*jensen)(isMemberOf=cn=My Dynamic Group,ou=Groups,dc=example,dc=com))" |
| | | mail |
| | | dn: uid=ajensen,ou=People,dc=example,dc=com |
| | |
| | | <literal>Virtual Static uniqueMember</literal> property.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-virtual-attribute-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --name "Virtual Static member" |
| | | --set allow-retrieving-membership:true |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | |
| | | <para>The following example creates a virtual static group, and reads the |
| | | group entry with all members.</para> |
| | |
| | | objectclass: ds-virtual-static-group |
| | | ds-target-group-dn: cn=My Dynamic Group,ou=Groups,dc=example,dc=com |
| | | |
| | | $ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -a -f virtual.ldif |
| | | $ ldapmodify --port 1389 --bindDN "cn=Directory Manager" --bindPassword password -a -f virtual.ldif |
| | | Processing ADD request for cn=Virtual Static,ou=Groups,dc=example,dc=com |
| | | ADD operation successful for DN cn=Virtual Static,ou=Groups,dc=example,dc=com |
| | | $ ldapsearch -p 1389 -b dc=example,dc=com "(cn=Virtual Static)" |
| | | $ ldapsearch --port 1389 --baseDN dc=example,dc=com "(cn=Virtual Static)" |
| | | dn: cn=Virtual Static,ou=Groups,dc=example,dc=com |
| | | objectClass: groupOfNames |
| | | objectClass: ds-virtual-static-group |
| | |
| | | <literal>isMemberOf</literal> attribute.</para> |
| | | |
| | | <screen>$ ldapsearch |
| | | -p 1389 |
| | | -b dc=example,dc=com |
| | | --port 1389 |
| | | --baseDN dc=example,dc=com |
| | | uid=bjensen |
| | | isMemberOf |
| | | dn: uid=bjensen,ou=People,dc=example,dc=com |
| | |
| | | use the <command>dsconfig</command> command.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-plugin-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --plugin-name "Referential Integrity" |
| | | --set enabled:true |
| | | -X -n</screen> |
| | | --trustAll --no-prompt</screen> |
| | | |
| | | <para>With the plugin enabled, you can see OpenDJ referential integrity |
| | | resolving group membership automatically.</para> |
| | | |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com "(cn=My Static Group)" |
| | | <screen>$ ldapsearch --port 1389 --baseDN dc=example,dc=com "(cn=My Static Group)" |
| | | dn: cn=My Static Group,ou=Groups,dc=example,dc=com |
| | | ou: Groups |
| | | objectClass: groupOfUniqueNames |
| | |
| | | cn: My Static Group |
| | | |
| | | $ ldapdelete |
| | | -p 1389 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | uid=scarter,ou=People,dc=example,dc=com |
| | | Processing DELETE request for uid=scarter,ou=People,dc=example,dc=com |
| | | DELETE operation successful for DN uid=scarter,ou=People,dc=example,dc=com |
| | | $ ldapsearch -p 1389 -b dc=example,dc=com "(cn=My Static Group)" |
| | | $ ldapsearch --port 1389 --baseDN 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>$ make-ldif --randomSeed 0 -t /path/to/my.template -o generated.ldif |
| | | <screen>$ make-ldif |
| | | --randomSeed 0 |
| | | --templateFile /path/to/my.template |
| | | --ldifFile /path/to/generated.ldif |
| | | Processed 1000 entries |
| | | Processed 2000 entries |
| | | ... |
| | |
| | | have millions of directory entries to import—first shut down the |
| | | server, and then run the <command>import-ldif</command> command.</para> |
| | | <screen>$ stop-ds |
| | | $ import-ldif -b dc=example,dc=org -n userRoot -l /path/to/generated.ldif</screen> |
| | | $ import-ldif |
| | | --includeBranch dc=example,dc=org |
| | | --backendID userRoot |
| | | --ldifFile /path/to/generated.ldif</screen> |
| | | </step> |
| | | <step> |
| | | <para>If not, schedule a task to import the data while online.</para> |
| | | <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> |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --includeBranch dc=example,dc=org |
| | | --backendID userRoot |
| | | --ldifFile /path/to/generated.ldif |
| | | --trustAll</screen> |
| | | <para>Notice that the task is scheduled through communication over SSL on |
| | | the administration port, by default <literal>4444</literal>. You can |
| | | schedule the import task to start at a particular time using the |
| | | <option>--start</option> option.</para> |
| | | <para>The <option>-X</option> option trusts all SSL certificates, such |
| | | as a default self-signed certificate used for testing.</para> |
| | | <para>The <option>--trustAll</option> option trusts all SSL certificates, |
| | | such as a default self-signed certificate used for testing.</para> |
| | | </step> |
| | | </stepalternatives> |
| | | </step> |
| | |
| | | <para>If you want to speed up export, first shut down the server, and then |
| | | export data using the <command>export-ldif</command> command.</para> |
| | | <screen>$ stop-ds |
| | | $ export-ldif -b dc=example,dc=org -n userRoot -l /path/to/backup.ldif</screen> |
| | | $ export-ldif |
| | | --includeBranch dc=example,dc=org |
| | | --backendID userRoot |
| | | --ldifFile /path/to/backup.ldif</screen> |
| | | </step> |
| | | <step> |
| | | <para>If not, schedule a task to export the data while online.</para> |
| | | <screen>$ export-ldif |
| | | -X |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | -b dc=example,dc=org |
| | | -n userRoot |
| | | -l /path/to/backup.ldif |
| | | --start 20111221230000</screen> |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --includeBranch dc=example,dc=org |
| | | --backendID userRoot |
| | | --ldifFile /path/to/backup.ldif |
| | | --start 20111221230000 |
| | | --trustAll</screen> |
| | | <para>The <option>--start 20111221230000</option> option tells OpenDJ to |
| | | start the export at 11 PM on December 21, 2012.</para> |
| | | <para>If OpenDJ is stopped at this time, then when you start OpenDJ again, |
| | |
| | | in a similar way to how you search LDAP directories with the |
| | | <command>ldapsearch</command> command.</para> |
| | | |
| | | <screen>$ ldifsearch -b dc=example,dc=org -l generated.ldif "(sn=Grenier)" mobile |
| | | <screen>$ ldifsearch |
| | | --includeBranch dc=example,dc=org |
| | | --ldifFile generated.ldif |
| | | "(sn=Grenier)" |
| | | mobile |
| | | dn: uid=user.4630,ou=People,dc=example,dc=org |
| | | mobile: +1 728 983 6669</screen> |
| | | |
| | | <para>The <option>-l <replaceable>ldif-file</replaceable></option> option |
| | | replaces the <option>--hostname</option> and <option>--port</option> options |
| | | used to connect to an LDAP directory. Otherwise the command syntax and LDIF |
| | | output is familiar to <command>ldapsearch</command> users.</para> |
| | | <para>The <option>--ldifFile <replaceable>ldif-file</replaceable></option> |
| | | option replaces the <option>--hostname</option> and <option>--port</option> |
| | | options used to connect to an LDAP directory. Otherwise the command syntax |
| | | and LDIF output is familiar to <command>ldapsearch</command> users.</para> |
| | | </section> |
| | | |
| | | <section xml:id="ldifmodify-example"> |
| | |
| | | replace: initials |
| | | initials: AAA |
| | | |
| | | $ ldifmodify -s generated.ldif -m changes.ldif -t new.ldif</screen> |
| | | $ ldifmodify |
| | | --targetLDIF generated.ldif |
| | | --changesLDIF changes.ldif |
| | | --targetLDIF new.ldif</screen> |
| | | |
| | | <para>Notice that the resulting new LDIF file is likely to be about the |
| | | same size as the source LDIF file.</para> |
| | |
| | | <para>The <command>ldif-diff</command> command reports differences between |
| | | two LDIF files in LDIF format.</para> |
| | | |
| | | <screen>$ ldif-diff -s old.ldif -t new.ldif |
| | | <screen>$ ldif-diff --sourceLDIF old.ldif --targetLDIF new.ldif |
| | | dn: uid=user.0,ou=People,dc=example,dc=org |
| | | changetype: modify |
| | | add: initials |
| | |
| | | |
| | | </screen> |
| | | |
| | | <para>The <option>-o <replaceable>ldif-file</replaceable></option> option |
| | | can be used to save the output to a file.</para> |
| | | <para>The <option>--outputLDIF <replaceable>ldif-file</replaceable></option> |
| | | option can be used to save the output to a file.</para> |
| | | |
| | | <para>As the <command>ldif-diff</command> command reads both files into |
| | | memory, constructing tree maps to perform the comparison, the command |
| | |
| | | allows clients to find people even when they misspell names as in the |
| | | following example.</para> |
| | | |
| | | <screen>$ ldapsearch -b dc=example,dc=com "(cn~=Babs Jansen)" cn |
| | | <screen>$ ldapsearch --baseDN 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>$ ldapsearch -b dc=example,dc=com "(uid=bjensen)" mail |
| | | <screen>$ ldapsearch --baseDN 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>$ ldapsearch -b dc=example,dc=com "(&(uidNumber>=1120)(roomNumber>=4500))" uid |
| | | <screen>$ ldapsearch |
| | | --baseDN 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>$ ldapsearch -b dc=example,dc=com "(aci=*)" - |
| | | <screen>$ ldapsearch --baseDN 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>$ ldapsearch -b dc=example,dc=com "(cn=Barb*)" cn |
| | | <screen>$ ldapsearch --baseDN dc=example,dc=com "(cn=Barb*)" cn |
| | | dn: uid=bfrancis,ou=People,dc=example,dc=com |
| | | cn: Barbara Francis |
| | | |
| | |
| | | <literal>description</literal>.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | create-local-db-index |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --backend-name userRoot |
| | | --index-name description |
| | | --set index-type:substring |
| | | -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </example> |
| | | |
| | | <example xml:id="approx-index-example"> |
| | |
| | | <literal>cn</literal> (common name).</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-local-db-index-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --backend-name userRoot |
| | | --index-name cn |
| | | --set index-type:approximate |
| | | -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </example> |
| | | </section> |
| | | |
| | |
| | | immediately with the server online.</para> |
| | | |
| | | <screen>$ rebuild-index |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | -b dc=example,dc=com |
| | | -i cn |
| | | -t 0 |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --baseDN dc=example,dc=com |
| | | --index cn |
| | | --start 0 |
| | | Rebuild Index task 20110607171639867 scheduled to start Jun 7, 2011 5:16:39 PM</screen> |
| | | </example> |
| | | </section> |
| | |
| | | configuration change to take effect.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-local-db-index-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --backend-name userRoot |
| | | --index-name objectClass |
| | | --set index-entry-limit:5000 |
| | | -n |
| | | --trustAll |
| | | --no-prompt |
| | | $ rebuild-index |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | -b dc=example,dc=com |
| | | -i objectclass |
| | | -t 0 |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --baseDN dc=example,dc=com |
| | | --index objectclass |
| | | --start 0 |
| | | Rebuild Index task 20110607160349596 scheduled to start Jun 7, 2011 4:03:49 PM</screen> |
| | | </example> |
| | | |
| | |
| | | <para>The following example verifies the <literal>cn</literal> (common |
| | | name) index for completeness and for errors.</para> |
| | | |
| | | <screen>$ verify-index -b dc=example,dc=com -i cn --clean --countErrors |
| | | <screen>$ verify-index |
| | | --baseDN dc=example,dc=com |
| | | --index 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 |
| | |
| | | is indexed as you expect. One way of checking is to request the |
| | | <literal>debugsearchindex</literal> attribute in your results.</para> |
| | | |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com "(uid=bjensen)" debugsearchindex |
| | | <screen>$ ldapsearch |
| | | --port 1389 |
| | | --baseDN dc=example,dc=com |
| | | "(uid=bjensen)" |
| | | debugsearchindex |
| | | dn: cn=debugsearch |
| | | debugsearchindex: filter=(uid=bjensen)[INDEX:uid.equality][COUNT:1] |
| | | final=[COUNT:1]</screen> |
| | |
| | | <para>A less exact search requires more work from OpenDJ. In the following |
| | | example OpenDJ would have to return 160 entries.</para> |
| | | |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com "(uid=*)" debugsearchindex |
| | | <screen>$ ldapsearch |
| | | --port 1389 |
| | | --baseDN dc=example,dc=com |
| | | "(uid=*)" |
| | | debugsearchindex |
| | | dn: cn=debugsearch |
| | | debugsearchindex: filter=(uid=*)[NOT-INDEXED] scope=wholeSubtree[COUNT:160] |
| | | final=[COUNT:160]</screen> |
| | |
| | | visiting the <literal>GNB00</literal> office and are looking for a |
| | | printer.</para> |
| | | |
| | | <screen>$ ldapsearch -b ou=Printers,dc=example,dc=com "(printerLocation=GNB00)"</screen> |
| | | <screen>$ ldapsearch --baseDN 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>$ ldapsearch -p 1389 -b dc=example,dc=com "(uid=*jensen*)" uid |
| | | <screen>$ ldapsearch --port 1389 --baseDN 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>$ ldapsearch -p 1389 -b ou=people,dc=example,dc=com |
| | | "(&(uid=*jensen*)(l=Santa Clara))" @person |
| | | <screen>$ ldapsearch |
| | | --port 1389 |
| | | --baseDN ou=people,dc=example,dc=com |
| | | "(&(uid=*jensen*)(l=Santa Clara))" |
| | | @person |
| | | dn: uid=ajensen,ou=People,dc=example,dc=com |
| | | objectClass: person |
| | | objectClass: organizationalPerson |
| | |
| | | to return all operational attributes. Alternatively, specify operational |
| | | attributes by name.</para> |
| | | |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com uid=bjensen + |
| | | <screen>$ ldapsearch --port 1389 --baseDN dc=example,dc=com uid=bjensen + |
| | | dn: uid=bjensen,ou=People,dc=example,dc=com |
| | | numSubordinates: 0 |
| | | structuralObjectClass: inetOrgPerson |
| | |
| | | attribute list after the filter to return the attributes associated with |
| | | a particular object class.</para> |
| | | |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com uid=bjensen @person |
| | | <screen>$ ldapsearch --port 1389 --baseDN dc=example,dc=com uid=bjensen @person |
| | | dn: uid=bjensen,ou=People,dc=example,dc=com |
| | | objectClass: person |
| | | objectClass: organizationalPerson |
| | |
| | | <para>In this example, Kirsten Vaughan checks whether the hashed password |
| | | value matches the stored value on <literal>authPassword</literal>.</para> |
| | | |
| | | <screen>$ ldapcompare -p 1389 -D "uid=kvaughan,ou=people,dc=example,dc=com" |
| | | -w bribery 'authPassword:MD5$dFHgpDxXUT8=$qlC4xMXvmVlusJLz9/WJ5Q==' |
| | | <screen>$ ldapcompare |
| | | --port 1389 |
| | | --bindDN "uid=kvaughan,ou=people,dc=example,dc=com" |
| | | --bindPassword bribery |
| | | 'authPassword:MD5$dFHgpDxXUT8=$qlC4xMXvmVlusJLz9/WJ5Q==' |
| | | uid=kvaughan,ou=people,dc=example,dc=com |
| | | Comparing type authPassword with value |
| | | MD5$dFHgpDxXUT8=$qlC4xMXvmVlusJLz9/WJ5Q== in entry |
| | |
| | | telephoneNumber: +33 1 12 23 34 45 |
| | | sn: Velmont |
| | | |
| | | $ ldapmodify -a -p 1389 -D "uid=kvaughan,ou=people,dc=example,dc=com" |
| | | -w bribery -f new-users.ldif |
| | | $ ldapmodify |
| | | --defaultAdd |
| | | --port 1389 |
| | | --bindDN "uid=kvaughan,ou=people,dc=example,dc=com" |
| | | --bindPassword bribery |
| | | --filename new-users.ldif |
| | | Processing ADD request for cn=Arsene Lupin,ou=Special Users,dc=example,dc=com |
| | | ADD operation successful for DN |
| | | cn=Arsene Lupin,ou=Special Users,dc=example,dc=com |
| | |
| | | add: jpegphoto |
| | | jpegphoto: /tmp/Samantha-Carter.jpg |
| | | |
| | | $ ldapmodify -p 1389 -D "uid=kvaughan,ou=people,dc=example,dc=com" |
| | | -w bribery -f scarter-mods.ldif |
| | | $ ldapmodify |
| | | --port 1389 |
| | | --bindDN "uid=kvaughan,ou=people,dc=example,dc=com" |
| | | --bindPassword bribery |
| | | --filename scarter-mods.ldif |
| | | Processing MODIFY request for uid=scarter,ou=people,dc=example,dc=com |
| | | MODIFY operation successful for DN uid=scarter,ou=people,dc=example,dc=com</screen> |
| | | </example> |
| | |
| | | replace: description |
| | | description: Accounting Director |
| | | |
| | | $ ldapmodify -p 1389 -D "uid=kvaughan,ou=people,dc=example,dc=com" |
| | | -w bribery -f scarter-newdesc.ldif |
| | | $ ldapmodify |
| | | --port 1389 |
| | | --bindDN "uid=kvaughan,ou=people,dc=example,dc=com" |
| | | --bindPassword bribery |
| | | --filename scarter-newdesc.ldif |
| | | Processing MODIFY request for uid=scarter,ou=people,dc=example,dc=com |
| | | MODIFY operation successful for DN uid=scarter,ou=people,dc=example,dc=com</screen> |
| | | </example> |
| | |
| | | changetype: modify |
| | | delete: jpegphoto |
| | | |
| | | $ ldapmodify -p 1389 -D "uid=kvaughan,ou=people,dc=example,dc=com" |
| | | -w bribery -f scarter-deljpeg.ldif |
| | | $ ldapmodify |
| | | --port 1389 |
| | | --bindDN "uid=kvaughan,ou=people,dc=example,dc=com" |
| | | --bindPassword bribery |
| | | --filename scarter-deljpeg.ldif |
| | | Processing MODIFY request for uid=scarter,ou=people,dc=example,dc=com |
| | | MODIFY operation successful for DN uid=scarter,ou=people,dc=example,dc=com</screen> |
| | | </example> |
| | |
| | | attributes to <literal>mail</literal> attributes. First, configure the |
| | | attribute cleanup plugin to rename the inbound attribute.</para> |
| | | |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password |
| | | <screen>$ dsconfig |
| | | create-plugin |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --type attribute-cleanup |
| | | --plugin-name "Rename email to mail" |
| | | --set enabled:true |
| | | --set rename-inbound-attributes:email:mail |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | |
| | | <para>Next, see that it works as expected.</para> |
| | | |
| | |
| | | email: newuser@example.com |
| | | userPassword: changeme |
| | | |
| | | $ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -a -f email.ldif |
| | | $ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --defaultAdd |
| | | --filename email.ldif |
| | | Processing ADD request for uid=newuser,ou=People,dc=example,dc=com |
| | | ADD operation successful for DN uid=newuser,ou=People,dc=example,dc=com |
| | | $ ldapsearch -p 1389 -b dc=example,dc=com uid=newuser mail |
| | | $ ldapsearch --port 1389 --baseDN dc=example,dc=com uid=newuser mail |
| | | dn: uid=newuser,ou=People,dc=example,dc=com |
| | | mail: newuser@example.com</screen> |
| | | </example> |
| | |
| | | and <literal>modifyTimestamp</literal> attributes. First, set up the |
| | | attribute cleanup plugin.</para> |
| | | |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password |
| | | <screen>$ dsconfig |
| | | create-plugin |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --type attribute-cleanup |
| | | --plugin-name "Remove attrs" |
| | | --set enabled:true |
| | |
| | | --set remove-inbound-attributes:createTimestamp |
| | | --set remove-inbound-attributes:modifiersName |
| | | --set remove-inbound-attributes:modifyTimestamp |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | |
| | | <para>Next, see that it works as expected.</para> |
| | | |
| | |
| | | modifiersName: cn=Directory Manager,cn=Root DNs,cn=config |
| | | modifyTimestamp: 20110930164937Z |
| | | |
| | | $ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -a -f badattrs.ldif |
| | | $ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --defaultAdd |
| | | --filename badattrs.ldif |
| | | Processing ADD request for uid=badattr,ou=People,dc=example,dc=com |
| | | ADD operation successful for DN uid=badattr,ou=People,dc=example,dc=com |
| | | $ ldapsearch -p 1389 -b dc=example,dc=com uid=badattr + |
| | | $ ldapsearch --port 1389 --baseDN dc=example,dc=com uid=badattr + |
| | | dn: uid=badattr,ou=People,dc=example,dc=com |
| | | numSubordinates: 0 |
| | | structuralObjectClass: inetOrgPerson |
| | |
| | | replace: mail |
| | | mail: sjensen@example.com |
| | | |
| | | $ ldapmodify -p 1389 -D "uid=kvaughan,ou=people,dc=example,dc=com" |
| | | -w bribery -f /path/to/scarter-sjensen.ldif |
| | | $ ldapmodify |
| | | --port 1389 |
| | | --bindDN "uid=kvaughan,ou=people,dc=example,dc=com" |
| | | --bindPassword bribery |
| | | --filename /path/to/scarter-sjensen.ldif |
| | | Processing MODIFY DN request for uid=scarter,ou=people,dc=example,dc=com |
| | | MODIFY DN operation successful for DN uid=scarter,ou=people,dc=example,dc=com |
| | | Processing MODIFY request for uid=sjensen,ou=people,dc=example,dc=com |
| | |
| | | deleteoldrdn: 1 |
| | | newsuperior: dc=example,dc=com |
| | | |
| | | $ ldapmodify -p 1389 -D "cn=Directory Manager" -w password |
| | | -f move-customers.ldif |
| | | $ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --filename move-customers.ldif |
| | | Processing MODIFY DN request for ou=Customers,dc=example,dc=com |
| | | MODIFY DN operation successful for DN ou=Customers,dc=example,dc=com |
| | | $ cat move-employees.pl |
| | |
| | | deleteoldrdn: 0\nnewsuperior: ou=People,dc=example,dc=com/; |
| | | print; |
| | | } |
| | | $ ldapsearch -p 1389 -b ou=Employees,dc=example,dc=com uid=* - | |
| | | $ ldapsearch --port 1389 --baseDN ou=Employees,dc=example,dc=com uid=* - | |
| | | move-employees.pl > /tmp/move-employees.ldif |
| | | $ head -n 6 /tmp/move-employees.ldif |
| | | dn: uid=abarnes,ou=Employees,dc=example,dc=com |
| | |
| | | deleteoldrdn: 0 |
| | | newsuperior: ou=People,dc=example,dc=com |
| | | |
| | | $ ldapmodify -p 1389 -D "cn=Directory Manager" -w password |
| | | -f /tmp/move-employees.ldif |
| | | $ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --filename /tmp/move-employees.ldif |
| | | Processing MODIFY DN request for uid=abarnes,ou=Employees,dc=example,dc=com |
| | | MODIFY DN operation successful for DN uid=abarnes,ou=Employees,dc=example,dc=com |
| | | Processing MODIFY DN request for uid=abergin,ou=Employees,dc=example,dc=com |
| | |
| | | ... |
| | | Processing MODIFY DN request for uid=wlutz,ou=Employees,dc=example,dc=com |
| | | MODIFY DN operation successful for DN uid=wlutz,ou=Employees,dc=example,dc=com |
| | | $ ldapdelete -p 1389 -D "cn=Directory Manager" -w password |
| | | $ ldapdelete |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | ou=Employees,dc=example,dc=com |
| | | Processing DELETE request for ou=Employees,dc=example,dc=com |
| | | DELETE operation successful for DN ou=Employees,dc=example,dc=com</screen> |
| | |
| | | <para>The following example uses the subtree delete option to remove |
| | | all Special Users from the directory.</para> |
| | | |
| | | <screen>$ ldapdelete -p 1389 -D "cn=Directory Manager" -w password |
| | | -x "ou=Special Users,dc=example,dc=com" |
| | | <screen>$ ldapdelete |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --deleteSubtree "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> |
| | | </example> |
| | |
| | | |
| | | <para>The following example shows Kirsten Vaughan resetting Sam Carter's |
| | | password. Kirsten has the appropriate privilege to reset Sam's |
| | | password. The <option>-q</option> option means the same thing as |
| | | <option>--useStartTLS</option>.</para> |
| | | password.</para> |
| | | |
| | | <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 |
| | | <screen>$ ldappasswordmodify |
| | | --useStartTLS |
| | | --port 1389 |
| | | --bindDN "uid=kvaughan,ou=people,dc=example,dc=com" |
| | | --bindPassword bribery |
| | | --authzID "dn:uid=scarter,ou=people,dc=example,dc=com" |
| | | --newPassword ChangeMe |
| | | The LDAP password modify operation was successful</screen> |
| | | |
| | | <para>You could also accomplish password reset with the following command, |
| | | but <command>set-password-is-reset</command> is a hidden option, supported |
| | | only for testing.</para> |
| | | |
| | | <screen>$ manage-account -D "cn=Directory Manager" -w password |
| | | set-password-is-reset -b uid=scarter,ou=people,dc=example,dc=com -O true |
| | | <screen>$ manage-account |
| | | set-password-is-reset |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --targetDN uid=scarter,ou=people,dc=example,dc=com |
| | | --operationValue true |
| | | Password Is Reset: true</screen> |
| | | </example> |
| | | |
| | |
| | | <para>You can use the <command>ldappasswordmodify</command> command to |
| | | change your password, as long as you know your current password.</para> |
| | | |
| | | <screen>$ ldappasswordmodify -p 1389 -a "dn:uid=bjensen,ou=people,dc=example,dc=com" |
| | | --currentPassword hifalutin --newPassword secret12 |
| | | <screen>$ ldappasswordmodify |
| | | --port 1389 |
| | | --authzID "dn:uid=bjensen,ou=people,dc=example,dc=com" |
| | | --currentPassword hifalutin |
| | | --newPassword secret12 |
| | | The LDAP password modify operation was successful</screen> |
| | | |
| | | <para>The same operation works for <literal>cn=Directory |
| | | Manager</literal>.</para> |
| | | |
| | | <screen>$ ldappasswordmodify -p 1389 -a "dn:cn=Directory Manager" |
| | | --currentPassword password --newPassword secret12 |
| | | <screen>$ ldappasswordmodify |
| | | --port 1389 |
| | | --authzID "dn:cn=Directory Manager" |
| | | --currentPassword password |
| | | --newPassword secret12 |
| | | The LDAP password modify operation was successful</screen> |
| | | </example> |
| | | |
| | |
| | | <para>By default, the password for Directory Manager uses the SSHA512 |
| | | password storage scheme. In the following example, the encoded password |
| | | is wrapped to fit on a printed page.</para> |
| | | <screen>$ encode-password -s SSHA512 -i |
| | | <screen>$ encode-password --storageScheme SSHA512 --interactivePassword |
| | | Please enter the password : |
| | | Please renter the password: |
| | | Encoded Password: "{SSHA512}U7Kx5oYcLxdsqSrpSkBk425LwL0Z61loNfS0dBVCcEKVhMyTT |
| | |
| | | <title>To Set Up Proxied Authorization</title> |
| | | <step> |
| | | <para>Grant access to applications that can use proxied authorization.</para> |
| | | <screen>$ ldapmodify -p 1389 -D "cn=Directory Manager" -w password |
| | | <screen>$ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | dn: dc=example,dc=com |
| | | changetype: modify |
| | | add: aci |
| | |
| | | </step> |
| | | <step> |
| | | <para>Grant the privilege to use proxied authorization to My App.</para> |
| | | <screen>$ ldapmodify -p 1389 -D "cn=Directory Manager" -w password |
| | | <screen>$ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | dn: cn=My App,ou=Apps,dc=example,dc=com |
| | | changetype: modify |
| | | add: ds-privilege-name |
| | |
| | | </step> |
| | | <step> |
| | | <para>Test that My App can use proxied authorization.</para> |
| | | <screen>$ ldapmodify -p 1389 -D "cn=My App,ou=Apps,dc=example,dc=com" -w password |
| | | -Y "dn:uid=kvaughan,ou=People,dc=example,dc=com" |
| | | <screen>$ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=My App,ou=Apps,dc=example,dc=com" |
| | | --bindPassword password |
| | | --proxyAs "dn:uid=kvaughan,ou=People,dc=example,dc=com" |
| | | dn: uid=bjensen,ou=People,dc=example,dc=com |
| | | changetype: modify |
| | | replace: description |
| | |
| | | <para>Change the port number using the <command>dsconfig</command> |
| | | command.</para> |
| | | <screen>$ dsconfig |
| | | -h `hostname` |
| | | -p 4444 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-connection-handler-prop |
| | | --hostname `hostname` |
| | | --port 4444 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --handler-name "LDAP Connection Handler" |
| | | --set listen-port:11389 |
| | | -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | <para>This example changes the port number to 11389 in the configuration.</para> |
| | | </step> |
| | | <step> |
| | |
| | | filename and key store PIN that you set up with the |
| | | <command>keytool</command> command.</para> |
| | | <screen>$ dsconfig |
| | | -h `hostname` |
| | | -p 4444 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | -X |
| | | set-key-manager-provider-prop |
| | | --hostname `hostname` |
| | | --port 4444 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --provider-name JKS |
| | | --set enabled:true |
| | | --set key-store-pin:changeit |
| | | --remove key-store-pin-file:config/keystore.pin |
| | | -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </step> |
| | | <step> |
| | | <para>Configure the File Based Trust Manager Provider for JKS to use the |
| | | key store and PIN as well.</para> |
| | | <screen>$ dsconfig |
| | | -h `hostname` |
| | | -p 4444 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | -X |
| | | set-trust-manager-provider-prop |
| | | --hostname `hostname` |
| | | --port 4444 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --provider-name JKS |
| | | --set enabled:true |
| | | --set trust-store-file:config/keystore |
| | | --set trust-store-pin:changeit |
| | | -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | <para>At this point, OpenDJ directory server can use your new self-signed |
| | | certificate, for example for StartTLS and LDAPS connection handlers.</para> |
| | | </step> |
| | |
| | | <step> |
| | | <para>Activate StartTLS on the current LDAP port.</para> |
| | | <screen>$ dsconfig |
| | | -h `hostname` |
| | | -p 4444 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-connection-handler-prop |
| | | --hostname `hostname` |
| | | --port 4444 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --handler-name "LDAP Connection Handler" |
| | | --set allow-start-tls:true |
| | | --set key-manager-provider:JKS |
| | | --set trust-manager-provider:JKS |
| | | -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | <para>The change takes effect. No need to restart the server.</para> |
| | | </step> |
| | | </procedure> |
| | |
| | | <step> |
| | | <para>Configure the server to activate LDAPS access.</para> |
| | | <screen>$ dsconfig |
| | | -h `hostname` |
| | | -p 4444 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-connection-handler-prop |
| | | --hostname `hostname` |
| | | --port 4444 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --handler-name "LDAPS Connection Handler" |
| | | --set listen-port:1636 |
| | | --set enabled:true |
| | | --set use-ssl:true |
| | | -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | <para>This example changes the port number to 1636 in the configuration.</para> |
| | | </step> |
| | | </procedure> |
| | |
| | | <para>Change the port number using the <command>dsconfig</command> |
| | | command.</para> |
| | | <screen>$ dsconfig |
| | | -h `hostname` |
| | | -p 4444 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-connection-handler-prop |
| | | --hostname `hostname` |
| | | --port 4444 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --handler-name "LDAPS Connection Handler" |
| | | --set listen-port:11636 |
| | | -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | <para>This example changes the port number to 11636 in the configuration.</para> |
| | | </step> |
| | | <step> |
| | |
| | | <step> |
| | | <para>Configure the server to activate JMX access.</para> |
| | | <screen>$ dsconfig |
| | | -h `hostname` |
| | | -p 4444 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-connection-handler-prop |
| | | --hostname `hostname` |
| | | --port 4444 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --handler-name "JMX Connection Handler" |
| | | --set enabled:true |
| | | -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | <para>This example uses the default port number, 1689.</para> |
| | | </step> |
| | | <step> |
| | |
| | | <step> |
| | | <para>Activate LDIF file access.</para> |
| | | <screen>$ dsconfig |
| | | -h `hostname` |
| | | -p 4444 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-connection-handler-prop |
| | | --hostname `hostname` |
| | | --port 4444 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --handler-name "LDIF Connection Handler" |
| | | --set enabled:true |
| | | -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | <para>The change takes effect immediately.</para> |
| | | </step> |
| | | <step> |
| | |
| | | exposed. The following example shows monitoring information about the |
| | | <literal>userRoot</literal> backend holding Example.com data.</para> |
| | | |
| | | <screen>$ ldapsearch -p 1389 -b cn=monitor "(cn=userRoot backend)" |
| | | <screen>$ ldapsearch --port 1389 --baseDN cn=monitor "(cn=userRoot backend)" |
| | | dn: cn=userRoot backend,cn=Disk Space Monitor,cn=monitor |
| | | disk-state: normal |
| | | objectClass: top |
| | |
| | | installed OpenDMK, you can set up a connection handler for SNMP.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | create-connection-handler |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --handler-name "SNMP Connection Handler" |
| | | --type snmp |
| | | --set enabled:true |
| | | --set listen-port:11161 |
| | | --set trap-port:11162 |
| | | --set opendmk-jarfile:<replaceable>OpenDMK-install-dir</replaceable>/lib/jdmkrt.jar |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </section> |
| | | |
| | | <section xml:id="jmx-monitoring"> |
| | |
| | | handler.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-connection-handler-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --handler-name "JMX Connection Handler" |
| | | --set enabled:true |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | |
| | | <para>By default, no users have privileges to access the JMX connection. The |
| | | following command adds JMX privileges for Directory Manager.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-root-dn-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --add default-root-privilege-name:jmx-notify |
| | | --add default-root-privilege-name:jmx-read |
| | | --add default-root-privilege-name:jmx-write |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | |
| | | <para>You must also configure security to login remotely. Good luck.</para> |
| | | |
| | |
| | | |
| | | <para>The <command>status</command> command takes administrative credentials |
| | | to read the configuration, as does the Control Panel.</para> |
| | | <screen>$ status -D "cn=Directory Manager" -w password |
| | | <screen>$ status --bindDN "cn=Directory Manager" --bindPassword password |
| | | |
| | | --- Server Status --- |
| | | Server Run Status: Started |
| | |
| | | servers.</para> |
| | | |
| | | <screen>$ manage-tasks |
| | | -h opendj.example.com |
| | | -p 4444 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | -X -n |
| | | --hostname opendj.example.com |
| | | --port 4444 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --trustAll |
| | | --no-prompt |
| | | |
| | | ID Type Status |
| | | -------------------------------------------------------- |
| | |
| | | the <command>dsconfig</command> command to enable alert notifications.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-alert-handler-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --handler-name "JMX Alert Handler" |
| | | --set enabled:true |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | |
| | | <para>OpenDJ can also send mail over SMTP instead of JMX notifications. |
| | | Before you set up the SMTP-based alert handler, you must identify an SMTP |
| | | server to which OpenDJ sends messages.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-global-configuration-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --set smtp-server:smtp.example.com |
| | | -X -n |
| | | --trustAll |
| | | --no-prompt |
| | | $ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | create-alert-handler |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --handler-name "SMTP Alert Handler" |
| | | --type smtp |
| | | --set enabled:true |
| | |
| | | --set message-body:"%%alert-message%%" |
| | | --set recipient-address:kvaughan@example.com |
| | | --set sender-address:opendj@example.com |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </section> |
| | | </chapter> |
| | |
| | | <para>Prevent the server from accepting updates from client |
| | | applications.</para> |
| | | <screen>$ dsconfig |
| | | -p 5444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-global-configuration-prop |
| | | --port 5444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --set writability-mode:internal-only |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </step> |
| | | <step> |
| | | <para>Disable replication for the server.</para> |
| | | <screen>$ dsreplication |
| | | disable |
| | | -a |
| | | -p 5444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | -X -n |
| | | --disableAll |
| | | --port 5444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --trustAll |
| | | --no-prompt |
| | | Establishing connections ..... Done. |
| | | Disabling replication on base DN dc=example,dc=com of server localhost:5444 |
| | | ..... Done. |
| | |
| | | <para>Enable and initialize replication.</para> |
| | | <screen>$ dsreplication |
| | | enable |
| | | -I admin |
| | | -w password |
| | | -X -n |
| | | -b dc=example,dc=com |
| | | --adminUID admin |
| | | --bindPassword password |
| | | --baseDN dc=example,dc=com |
| | | --host1 localhost |
| | | --port1 4444 |
| | | --bindDN1 "cn=Directory Manager" |
| | |
| | | --bindDN2 "cn=Directory Manager" |
| | | --bindPassword2 password |
| | | --replicationPort2 8989 |
| | | --trustAll |
| | | --no-prompt |
| | | |
| | | Establishing connections ..... Done. |
| | | Checking registration information ..... Done. |
| | |
| | | |
| | | $ dsreplication |
| | | pre-external-initialization |
| | | -I admin |
| | | -w password |
| | | -X -n |
| | | -p 4444 |
| | | -b dc=example,dc=com |
| | | --adminUID admin |
| | | --bindPassword password |
| | | --port 4444 |
| | | --baseDN dc=example,dc=com |
| | | --trustAll |
| | | --no-prompt |
| | | |
| | | Preparing base DN dc=example,dc=com to be initialized externally ..... Done. |
| | | |
| | |
| | | contents. |
| | | $ dsreplication |
| | | post-external-initialization |
| | | -I admin |
| | | -w password |
| | | -X -n |
| | | -p 4444 |
| | | -b dc=example,dc=com |
| | | --adminUID admin |
| | | --bindPassword password |
| | | --port 4444 |
| | | --baseDN dc=example,dc=com |
| | | --trustAll |
| | | --no-prompt |
| | | |
| | | Updating replication information on base DN dc=example,dc=com ..... Done. |
| | | |
| | |
| | | <step> |
| | | <para>Accept updates from client applications.</para> |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-global-configuration-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --set writability-mode:enabled |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </step> |
| | | <step> |
| | | <para>Direct client applications to the server.</para> |
| | |
| | | |
| | | <step> |
| | | <para>Start <command>dsconfig</command> in interactive mode.</para> |
| | | <screen>$ dsconfig -p 4444 -h `hostname` -D "cn=Directory Manager" -w password</screen> |
| | | <screen>$ dsconfig |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password</screen> |
| | | </step> |
| | | <step> |
| | | <para>Select the Root DN menu.</para> |
| | |
| | | insufficent access when trying to read the server configuration, or |
| | | reset a user password.</para> |
| | | <screen>$ ldapsearch |
| | | -p 1389 |
| | | -D "uid=kvaughan,ou=People,dc=example,dc=com" |
| | | -w bribery |
| | | -b cn=config |
| | | --port 1389 |
| | | --bindDN "uid=kvaughan,ou=people,dc=example,dc=com" |
| | | --bindPassword bribery |
| | | --baseDN cn=config |
| | | "(objectclass=*)" |
| | | SEARCH operation failed |
| | | Result Code: 50 (Insufficient Access Rights) |
| | | Additional Information: You do not have sufficient privileges to perform |
| | | search operations in the Directory Server configuration |
| | | $ 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 |
| | | --port 1389 |
| | | --bindDN "uid=kvaughan,ou=people,dc=example,dc=com" |
| | | --bindPassword bribery |
| | | --authzID "dn:uid=scarter,ou=People,dc=example,dc=com" |
| | | --newPassword changeit |
| | | The LDAP password modify operation failed with result code 50 |
| | | Error Message: You do not have sufficient privileges to perform password |
| | | reset operations</screen> |
| | |
| | | <step> |
| | | <para>Apply the change as a user with the |
| | | <literal>privilege-change</literal> privilege.</para> |
| | | <screen>$ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -f privilege.ldif |
| | | <screen>$ ldapmodify --port 1389 --bindDN "cn=Directory Manager" --bindPassword 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>$ ldapsearch |
| | | -p 1389 |
| | | -D "uid=kvaughan,ou=People,dc=example,dc=com" |
| | | -w bribery |
| | | -b cn=config |
| | | --port 1389 |
| | | --bindDN "uid=kvaughan,ou=people,dc=example,dc=com" |
| | | --bindPassword bribery |
| | | --baseDN cn=config |
| | | "(objectclass=*)" |
| | | dn: cn=config |
| | | ds-cfg-return-bind-error-messages: false |
| | |
| | | cn=config |
| | | ... |
| | | $ 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 |
| | | --port 1389 |
| | | --bindDN "uid=kvaughan,ou=people,dc=example,dc=com" |
| | | --bindPassword bribery |
| | | --authzID "dn:uid=scarter,ou=People,dc=example,dc=com" |
| | | --newPassword changeit |
| | | The LDAP password modify operation was successful</screen> |
| | | </step> |
| | | </procedure> |
| | |
| | | subtreeSpecification: {base "ou=people", specificationFilter |
| | | "(isMemberOf=cn=Directory Administrators,ou=Groups,dc=example,dc=com)" } |
| | | |
| | | $ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -a -f collective.ldif |
| | | $ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --defaultAdd |
| | | --filename collective.ldif |
| | | Processing ADD request for cn=Administrator Privileges,dc=example,dc=com |
| | | ADD operation successful for DN cn=Administrator Privileges,dc=example,dc=com</screen> |
| | | <para>The Directory Administrators group for Example.com includes members |
| | |
| | | <step> |
| | | <para>Observe that the change takes effect immediately.</para> |
| | | <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 |
| | | --port 1389 |
| | | --bindDN "uid=kvaughan,ou=people,dc=example,dc=com" |
| | | --bindPassword bribery |
| | | --authzID "dn:uid=scarter,ou=People,dc=example,dc=com" |
| | | --newPassword changeit |
| | | The LDAP password modify operation was successful</screen> |
| | | </step> |
| | | </procedure> |
| | |
| | | who are willing to carpool.</para> |
| | | |
| | | <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" |
| | | --port 1389 |
| | | --bindDN "uid=bjensen,ou=people,dc=example,dc=com" |
| | | --bindPassword hifalutin |
| | | --baseDN "ou=Self Service,ou=Groups,dc=example,dc=com" |
| | | "cn=*" |
| | | dn: cn=Carpoolers,ou=Self Service,ou=Groups,dc=example,dc=com |
| | | objectClass: groupOfNames |
| | |
| | | Babs has on the entry.</para> |
| | | |
| | | <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" |
| | | --control effectiverights |
| | | --port 1389 |
| | | --bindDN "uid=bjensen,ou=people,dc=example,dc=com" |
| | | --bindPassword hifalutin |
| | | --baseDN "ou=Self Service,ou=Groups,dc=example,dc=com" |
| | | "cn=*" |
| | | aclRights |
| | | dn: cn=Carpoolers,ou=Self Service,ou=Groups,dc=example,dc=com |
| | |
| | | information about the ACIs applied to arrive at the results.</para> |
| | | |
| | | <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" |
| | | --control effectiverights |
| | | --port 1389 |
| | | --bindDN "uid=bjensen,ou=people,dc=example,dc=com" |
| | | --bindPassword hifalutin |
| | | --baseDN "ou=Self Service,ou=Groups,dc=example,dc=com" |
| | | "cn=*" |
| | | aclRights |
| | | aclRightsInfo |
| | |
| | | <para>Set up an authentication policy for pass through |
| | | authentication to the authentication server.</para> |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=directory manager" |
| | | -w password |
| | | create-password-policy |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --type ldap-pass-through |
| | | --policy-name "PTA Policy" |
| | | --set primary-remote-ldap-server:pta-server.example.com:636 |
| | |
| | | --set mapping-policy:mapped-search |
| | | --set use-ssl:true |
| | | --set trust-manager-provider:JKS |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | <para>The policy shown here maps identities under |
| | | <literal>dc=example,dc=com</literal> to identities under |
| | | <literal>dc=PTA Server,dc=com</literal>, where users have the same |
| | |
| | | <step> |
| | | <para>Check that your policy has been added to the list.</para> |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=directory manager" |
| | | -w password |
| | | list-password-policies |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --property use-ssl |
| | | |
| | | Password Policy : Type : use-ssl |
| | |
| | | enable the user with <literal>cn=LDAP PTA User</literal> on OpenDJ |
| | | authenticate through to Active Directory.</para> |
| | | |
| | | <screen>$ ldapsearch -h opendj.example.com -b dc=example,dc=com uid=ldapptauser cn |
| | | <screen>$ ldapsearch |
| | | --hostname opendj.example.com |
| | | --baseDN dc=example,dc=com |
| | | uid=ldapptauser |
| | | cn |
| | | dn: uid=ldapptauser,ou=People,dc=example,dc=com |
| | | cn: LDAP PTA User |
| | | |
| | | $ ldapsearch -h ad.example.com -b "CN=Users,DC=internal,DC=forgerock,DC=com" |
| | | -D "cn=administrator,cn=Users,DC=internal,DC=forgerock,DC=com" -w password |
| | | "(cn=LDAP PTA User)" cn |
| | | $ ldapsearch |
| | | --hostname ad.example.com |
| | | --baseDN "CN=Users,DC=internal,DC=forgerock,DC=com" |
| | | --bindDN "cn=administrator,cn=Users,DC=internal,DC=forgerock,DC=com" |
| | | --bindPassword password |
| | | "(cn=LDAP PTA User)" |
| | | cn |
| | | dn: CN=LDAP PTA User,CN=Users,DC=internal,DC=forgerock,DC=com |
| | | cn: LDAP PTA User</screen> |
| | | |
| | |
| | | <para>Set up an authentication policy for OpenDJ users to authenticate |
| | | to Active Directory.</para> |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | create-password-policy |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --type ldap-pass-through |
| | | --policy-name "AD PTA Policy" |
| | | --set primary-remote-ldap-server:ad.example.com:636 |
| | |
| | | --set mapping-policy:mapped-search |
| | | --set trust-manager-provider:JKS |
| | | --set use-ssl:true |
| | | -X -n</screen> |
| | | --trustAll --no-prompt</screen> |
| | | </step> |
| | | <step> |
| | | <para>Assign the authentication policy to a test user.</para> |
| | | <screen>$ ldapmodify -p 1389 -D "cn=Directory Manager" -w password |
| | | <screen>$ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | dn: uid=ldapptauser,ou=People,dc=example,dc=com |
| | | changetype: modify |
| | | add: ds-pwp-password-policy-dn |
| | |
| | | <para>Check that the user can bind using pass through authentication to |
| | | Active Directory.</para> |
| | | <screen>$ ldapsearch |
| | | -h opendj.example.com |
| | | -p 1389 |
| | | -b dc=example,dc=com |
| | | -D uid=ldapptauser,ou=People,dc=example,dc=com |
| | | -w password |
| | | --hostname opendj.example.com |
| | | --port 1389 |
| | | --baseDN dc=example,dc=com |
| | | --bindDN uid=ldapptauser,ou=People,dc=example,dc=com |
| | | --bindPassword password |
| | | "(cn=LDAP PTA User)" |
| | | userpassword cn |
| | | dn: uid=ldapptauser,ou=People,dc=example,dc=com |
| | |
| | | authentication policy does not have a value for the operational attribute |
| | | <literal>pwdPolicySubentry</literal>.</para> |
| | | <screen>$ ldapsearch |
| | | -p 1389 |
| | | -b dc=example,dc=com |
| | | --port 1389 |
| | | --baseDN dc=example,dc=com |
| | | uid=user.0 |
| | | pwdPolicySubentry |
| | | dn: uid=user.0,ou=People,dc=example,dc=com |
| | |
| | | "ds-pwp-password-policy-dn")(version 3.0;acl "Cannot choose own pass |
| | | word policy";deny (write)(userdn = "ldap:///self");) |
| | | |
| | | $ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -f protect-pta.ldif |
| | | $ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --filename protect-pta.ldif |
| | | Processing MODIFY request for ou=People,dc=example,dc=com |
| | | MODIFY operation successful for DN ou=People,dc=example,dc=com</screen> |
| | | </step> |
| | | <step> |
| | | <para>Update the user's <literal>ds-pwp-password-policy-dn</literal> |
| | | attribute.</para> |
| | | <screen>$ ldapmodify -p 1389 -D "cn=Directory Manager" -w password |
| | | <screen>$ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | dn: uid=user.0,ou=People,dc=example,dc=com |
| | | changetype: modify |
| | | add: ds-pwp-password-policy-dn |
| | |
| | | <para>Check that the user can authenticate through to the authentication |
| | | server.</para> |
| | | <screen>$ ldapsearch |
| | | -p 1389 |
| | | -b dc=example,dc=com |
| | | -D uid=user.0,ou=People,dc=example,dc=com -w password |
| | | --port 1389 |
| | | --baseDN dc=example,dc=com |
| | | --bindDN uid=user.0,ou=People,dc=example,dc=com |
| | | --bindPassword password |
| | | uid=user.0 |
| | | cn sn |
| | | dn: uid=user.0,ou=People,dc=example,dc=com |
| | |
| | | subtreeSpecification: { base "ou=People", specificationFilter "(isMemberOf= |
| | | cn=Directory Administrators,ou=Groups,dc=example,dc=com)"} |
| | | |
| | | $ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -a -f pta-coll.ldif |
| | | $ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --defaultAdd |
| | | --filename pta-coll.ldif |
| | | Processing ADD request for cn=PTA Policy for Dir Admins,dc=example,dc=com |
| | | ADD operation successful for DN cn=PTA Policy for Dir Admins,dc=example,dc=com</screen> |
| | | </step> |
| | |
| | | <para>Make sure you can bind as the user on the authentication |
| | | server.</para> |
| | | <screen>$ ldapsearch |
| | | -p 2389 |
| | | -D "uid=kvaughan,ou=People,dc=PTA Server,dc=com" |
| | | -w password |
| | | -b "dc=PTA Server,dc=com" |
| | | --port 2389 |
| | | --bindDN "uid=kvaughan,ou=People,dc=PTA Server,dc=com" |
| | | --bindPassword password |
| | | --baseDN "dc=PTA Server,dc=com" |
| | | uid=kvaughan |
| | | dn: uid=kvaughan,ou=People,dc=PTA Server,dc=com |
| | | objectClass: person |
| | |
| | | <para>Check that the user can authenticate through to the authentication |
| | | server from OpenDJ.</para> |
| | | <screen>$ ldapsearch |
| | | -p 1389 |
| | | -D "uid=kvaughan,ou=People,dc=example,dc=com" |
| | | -w password |
| | | -b dc=example,dc=com |
| | | --port 1389 |
| | | --bindDN "uid=kvaughan,ou=people,dc=example,dc=com" |
| | | --bindPassword password |
| | | --baseDN dc=example,dc=com |
| | | uid=kvaughan |
| | | cn sn |
| | | dn: uid=kvaughan,ou=People,dc=example,dc=com |
| | |
| | | follows.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | get-password-policy-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --policy-name "Default Password Policy" |
| | | --advanced |
| | | Property : Value(s) |
| | |
| | | password.</para> |
| | | |
| | | <screen>$ ldapsearch |
| | | -p 1389 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | -b dc=example,dc=com |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --baseDN dc=example,dc=com |
| | | uid=bjensen |
| | | userpassword |
| | | dn: uid=bjensen,ou=People,dc=example,dc=com |
| | |
| | | <para>The password policy that applies to a user is identified by the |
| | | operational attribute, <literal>pwdPolicySubentry</literal>.</para> |
| | | |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com uid=bjensen pwdPolicySubentry |
| | | <screen>$ ldapsearch --port 1389 --baseDN 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> |
| | |
| | | <step> |
| | | <para>Enable the appropriate password validator.</para> |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-password-validator-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --validator-name Dictionary |
| | | --set enabled:true |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </step> |
| | | <step> |
| | | <para>Apply the changes to the default password policy.</para> |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-password-policy-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --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> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </step> |
| | | <step> |
| | | <para>Check your work.</para> |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | get-password-policy-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --policy-name "Default Password Policy" |
| | | Property : Value(s) |
| | | ------------------------------------------:-------------------------- |
| | |
| | | <step> |
| | | <para>Create the new password policy.</para> |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | create-password-policy |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --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> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </step> |
| | | <step> |
| | | <para>Check your work.</para> |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | get-password-policy-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --policy-name "New Account Password Policy" |
| | | Property : Value(s) |
| | | ------------------------------------------:------------- |
| | |
| | | <step> |
| | | <para>Add the policy to the directory.</para> |
| | | <screen>$ ldapmodify |
| | | -p 1389 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | -a |
| | | -f /path/to/subentry-pwp.ldif |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --defaultAdd |
| | | --filename /path/to/subentry-pwp.ldif |
| | | Processing ADD request for cn=Subentry Password Policy,dc=example,dc=com |
| | | ADD operation successful for DN cn=Subentry Password Policy,dc=example,dc=com</screen> |
| | | </step> |
| | |
| | | while a normal user has the default password policy. Here, Kirsten Vaughan |
| | | is a member of the Directory Administrators group, and Babs Jensen is not |
| | | a member.</para> |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com uid=kvaughan pwdPolicySubentry |
| | | <screen>$ ldapsearch |
| | | --port 1389 |
| | | --baseDN dc=example,dc=com |
| | | uid=kvaughan |
| | | pwdPolicySubentry |
| | | dn: uid=kvaughan,ou=People,dc=example,dc=com |
| | | pwdPolicySubentry: cn=Subentry Password Policy,dc=example,dc=com |
| | | |
| | | $ ldapsearch -p 1389 -b dc=example,dc=com uid=bjensen pwdPolicySubentry |
| | | $ ldapsearch |
| | | --port 1389 |
| | | --baseDN 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> |
| | | </step> |
| | |
| | | "ds-pwp-password-policy-dn")(version 3.0;acl "Cannot choose own pass |
| | | word policy";deny (write)(userdn = "ldap:///self");) |
| | | |
| | | $ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -f protectpwp.ldif |
| | | $ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --filename protectpwp.ldif |
| | | Processing MODIFY request for ou=People,dc=example,dc=com |
| | | MODIFY operation successful for DN ou=People,dc=example,dc=com</screen> |
| | | </step> |
| | |
| | | ds-pwp-password-policy-dn: cn=New Account Password Policy,cn=Password Policies, |
| | | cn=config |
| | | |
| | | $ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -a -f newuser.ldif |
| | | $ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --defaultAdd |
| | | --filename newuser.ldif |
| | | Processing ADD request for uid=newuser,ou=People,dc=example,dc=com |
| | | ADD operation successful for DN uid=newuser,ou=People,dc=example,dc=com</screen> |
| | | </step> |
| | | <step> |
| | | <para>Check your work.</para> |
| | | <screen>$ ldapsearch |
| | | -p 1389 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | -b dc=example,dc=com |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --baseDN dc=example,dc=com |
| | | uid=newuser |
| | | pwdPolicySubentry |
| | | dn: uid=newuser,ou=People,dc=example,dc=com |
| | |
| | | subtreeSpecification: { base "ou=People", specificationFilter "(isMemberOf= |
| | | cn=Directory Administrators,ou=Groups,dc=example,dc=com)"} |
| | | |
| | | $ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -a -f pwp-coll.ldif |
| | | $ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --defaultAdd |
| | | --filename pwp-coll.ldif |
| | | Processing ADD request for cn=Password Policy for Dir Admins,dc=example,dc=com |
| | | ADD operation successful for DN cn=Password Policy for Dir |
| | | Admins,dc=example,dc=com</screen> |
| | |
| | | <step> |
| | | <para>Check your work.</para> |
| | | |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com uid=kvaughan pwdPolicySubentry |
| | | <screen>$ ldapsearch |
| | | --port 1389 |
| | | --baseDN 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> |
| | |
| | | add: ref |
| | | ref: ldap://opendj.example.com:2389/ou=People,dc=example,dc=com |
| | | |
| | | $ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -f referral.ldif |
| | | $ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --filename referral.ldif |
| | | Processing MODIFY request for ou=People,dc=example,dc=com |
| | | MODIFY operation successful for DN ou=People,dc=example,dc=com</screen> |
| | | |
| | |
| | | <literal>ou=People,dc=example,dc=com</literal>. OpenDJ can now return |
| | | a referral for operations under the People organizational unit.</para> |
| | | |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com uid=bjensen description |
| | | <screen>$ ldapsearch --port 1389 --baseDN 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 |
| | | $ ldapsearch --port 1389 --baseDN dc=example,dc=com ou=people |
| | | SearchReference(referralURLs= |
| | | {ldap://opendj.example.com:2389/ou=People,dc=example,dc=com??sub?})</screen> |
| | | |
| | | <para>To access the entry instead of the referral, use the Manage DSAIT |
| | | control.</para> |
| | | |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com -J ManageDSAIT:true ou=people ref |
| | | <screen>$ ldapsearch |
| | | --port 1389 |
| | | --baseDN dc=example,dc=com |
| | | --control ManageDSAIT:true |
| | | ou=people |
| | | ref |
| | | dn: ou=People,dc=example,dc=com |
| | | ref: ldap://opendj.example.com:2389/ou=People,dc=example,dc=com |
| | | |
| | |
| | | delete: ref |
| | | ref: ldap://opendj.example.com:2389/ou=People,dc=example,dc=com |
| | | |
| | | $ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -f people.ldif |
| | | $ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --filename people.ldif |
| | | Processing MODIFY request for ou=People,dc=example,dc=com |
| | | MODIFY operation successful for DN ou=People,dc=example,dc=com |
| | | A referral entry ou=People,dc=example,dc=com indicates that the operation must |
| | | be processed at a different server |
| | | [ldap://opendj.example.com:2389/ou=People,dc=example,dc=com] |
| | | $ ldapmodify |
| | | -p 1389 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | -J ManageDSAIT |
| | | -f people.ldif |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --control ManageDSAIT |
| | | --filename people.ldif |
| | | Processing MODIFY request for ou=People,dc=example,dc=com |
| | | MODIFY operation successful for DN ou=People,dc=example,dc=com |
| | | $ ldapsearch -p 1389 -b dc=example,dc=com ou=people |
| | | $ ldapsearch --port 1389 --baseDN dc=example,dc=com ou=people |
| | | dn: ou=People,dc=example,dc=com |
| | | ou: People |
| | | objectClass: organizationalunit |
| | |
| | | |
| | | <screen>$ dsreplication |
| | | enable |
| | | -I admin |
| | | -w password |
| | | -X -n |
| | | -b dc=example,dc=com |
| | | --adminUID admin |
| | | --bindPassword password |
| | | --baseDN dc=example,dc=com |
| | | --host1 `hostname` |
| | | --port1 4444 |
| | | --bindDN1 "cn=Directory Manager" |
| | |
| | | --bindDN2 "cn=Directory Manager" |
| | | --bindPassword2 password |
| | | --replicationPort2 9989 |
| | | --trustAll |
| | | --no-prompt |
| | | |
| | | Establishing connections ..... Done. |
| | | Checking registration information ..... Done. |
| | |
| | | |
| | | <screen>$ dsreplication |
| | | initialize-all |
| | | -I admin |
| | | -w password |
| | | -X -n |
| | | -b dc=example,dc=com |
| | | -h `hostname` |
| | | -p 4444 |
| | | --adminUID admin |
| | | --bindPassword password |
| | | --baseDN dc=example,dc=com |
| | | --hostname `hostname` |
| | | --port 4444 |
| | | --trustAll |
| | | --no-prompt |
| | | |
| | | Initializing base DN dc=example,dc=com with the contents from localhost:4444: |
| | | 160 entries processed (100 % complete). |
| | |
| | | initialize-all</command> command.</para> |
| | | <screen>$ dsreplication |
| | | initialize-all |
| | | -I admin |
| | | -w password |
| | | -X -n |
| | | -b dc=example,dc=com |
| | | -h `hostname` |
| | | -p 4444 |
| | | --adminUID admin |
| | | --bindPassword password |
| | | --baseDN dc=example,dc=com |
| | | --hostname `hostname` |
| | | --port 4444 |
| | | --trustAll |
| | | --no-prompt |
| | | Initializing base DN dc=example,dc=com with the contents from localhost:4444: |
| | | 161 entries processed (100 % complete). |
| | | Base DN initialized successfully. |
| | |
| | | <para>Enable replication on the new replica.</para> |
| | | <screen>$ dsreplication |
| | | enable |
| | | -I admin |
| | | -w password |
| | | -X -n |
| | | -b dc=example,dc=com |
| | | --adminUID admin |
| | | --bindPassword password |
| | | --baseDN dc=example,dc=com |
| | | --host1 `hostname` |
| | | --port1 4444 |
| | | --bindDN1 "cn=Directory Manager" |
| | |
| | | --bindDN2 "cn=Directory Manager" |
| | | --bindPassword2 password |
| | | --replicationPort2 10989 |
| | | --trustAll |
| | | --no-prompt |
| | | |
| | | Establishing connections ..... Done. |
| | | Checking registration information ..... Done. |
| | |
| | | <para>Prepare the new replica for initialization.</para> |
| | | <screen>$ dsreplication |
| | | pre-external-initialization |
| | | -I admin |
| | | -w password |
| | | -X -n |
| | | -p 6444 |
| | | -b dc=example,dc=com |
| | | --adminUID admin |
| | | --bindPassword password |
| | | --port 6444 |
| | | --baseDN dc=example,dc=com |
| | | --trustAll |
| | | --no-prompt |
| | | |
| | | Preparing base DN dc=example,dc=com to be initialized externally ..... Done. |
| | | |
| | |
| | | <para>Initialize replication on the new replica.</para> |
| | | <screen>$ dsreplication |
| | | post-external-initialization |
| | | -I admin |
| | | -w password |
| | | -X -n |
| | | -p 6444 |
| | | -b dc=example,dc=com |
| | | --adminUID admin |
| | | --bindPassword password |
| | | --port 6444 |
| | | --baseDN dc=example,dc=com |
| | | --trustAll |
| | | --no-prompt |
| | | |
| | | Updating replication information on base DN dc=example,dc=com ..... Done. |
| | | |
| | |
| | | <step> |
| | | <para>Disable the multimaster synchronization provider.</para> |
| | | <screen>$ dsconfig |
| | | -p 5444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-synchronization-provider-prop |
| | | -X -n |
| | | --port 5444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --provider-name "Multimaster Synchronization" |
| | | --set enabled:false</screen> |
| | | --set enabled:false |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | <para>Do NOT allow modifications on the replica for which replication is |
| | | paused, as no record of such changes is kept, and the changes cause |
| | | replication to diverge.</para> |
| | |
| | | <para>When you are ready to resume replication, enable the multimaster |
| | | synchronization provider.</para> |
| | | <screen>$ dsconfig |
| | | -p 5444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-synchronization-provider-prop |
| | | -X -n |
| | | --port 5444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --provider-name "Multimaster Synchronization" |
| | | --set enabled:true</screen> |
| | | --set enabled:true |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </step> |
| | | </procedure> |
| | | |
| | |
| | | command.</para> |
| | | <screen>$ dsreplication |
| | | disable |
| | | -a |
| | | -p 5444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | -X -n |
| | | --disableAll |
| | | --port 5444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --trustAll |
| | | --no-prompt |
| | | Establishing connections ..... Done. |
| | | Disabling replication on base DN cn=admin data of server localhost:5444 |
| | | ..... Done. |
| | |
| | | <option>--onlyReplicationServer</option> options.</para> |
| | | <screen>$ dsreplication |
| | | enable |
| | | -I admin |
| | | -w password |
| | | -X -n |
| | | -b dc=example,dc=com |
| | | --adminUID admin |
| | | --bindPassword password |
| | | --baseDN dc=example,dc=com |
| | | --host1 `hostname` |
| | | --port1 4444 |
| | | --bindDN1 "cn=Directory Manager" |
| | |
| | | --bindPassword2 password |
| | | --replicationPort2 8989 |
| | | --onlyReplicationServer2 |
| | | --trustAll |
| | | --no-prompt |
| | | Establishing connections ..... Done. |
| | | Only one replication server will be defined for the following base DN's: |
| | | dc=example,dc=com |
| | |
| | | |
| | | $ dsreplication |
| | | enable |
| | | -I admin |
| | | -w password |
| | | -X -n |
| | | -b dc=example,dc=com |
| | | --adminUID admin |
| | | --bindPassword password |
| | | --baseDN dc=example,dc=com |
| | | --host1 `hostname` |
| | | --port1 5444 |
| | | --bindDN1 "cn=Directory Manager" |
| | |
| | | --bindPassword2 password |
| | | --replicationPort2 8989 |
| | | --onlyReplicationServer2 |
| | | --trustAll |
| | | --no-prompt |
| | | |
| | | Establishing connections ..... Done. |
| | | Only one replication server will be defined for the following base DN's: |
| | |
| | | <para>Initialize replication from one of the directory servers.</para> |
| | | <screen>$ dsreplication |
| | | initialize-all |
| | | -I admin |
| | | -w password |
| | | -X -n |
| | | -b dc=example,dc=com |
| | | -h `hostname` |
| | | -p 4444 |
| | | --adminUID admin |
| | | --bindPassword password |
| | | --baseDN dc=example,dc=com |
| | | --hostname `hostname` |
| | | --port 4444 |
| | | --trustAll |
| | | --no-prompt |
| | | |
| | | Initializing base DN dc=example,dc=com with the contents from localhost:4444: |
| | | 160 entries processed (100 % complete). |
| | |
| | | <para>Set the group ID for each group by replication domain on the |
| | | directory servers.</para> |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-replication-domain-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --provider-name "MultimasterSynchronization" |
| | | --domain-name "dc=example,dc=com" |
| | | --set group-id:1 |
| | | -X -n |
| | | --trustAll |
| | | --no-prompt |
| | | |
| | | $ dsconfig |
| | | -p 5444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-replication-domain-prop |
| | | --port 5444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --provider-name "Multimaster Synchronization" |
| | | --domain-name "dc=example,dc=com" |
| | | --set group-id:2 |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </step> |
| | | <step> |
| | | <para>Set the group ID for each group on the replication servers.</para> |
| | | <screen>$ dsconfig |
| | | -p 6444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-replication-server-prop |
| | | --port 6444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --provider-name "Multimaster Synchronization" |
| | | --set group-id:1 |
| | | -X -n |
| | | --trustAll |
| | | --no-prompt |
| | | $ dsconfig |
| | | -p 7444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-replication-server-prop |
| | | --port 7444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --provider-name "Multimaster Synchronization" |
| | | --set group-id:2 |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </step> |
| | | </procedure> |
| | | |
| | |
| | | applications.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 5444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-global-configuration-prop |
| | | --port 5444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --set writability-mode:internal-only |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </section> |
| | | |
| | | <section xml:id="repl-assured"> |
| | |
| | | domain, and also set the safe data level.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-replication-domain-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --provider-name "Multimaster Synchronization" |
| | | --domain-name "dc=example,dc=com" |
| | | --set assured-type:safe-data |
| | | --set assured-sd-level:1 |
| | | -X -n |
| | | --trustAll |
| | | --no-prompt |
| | | |
| | | $ dsconfig |
| | | -p 5444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-replication-domain-prop |
| | | --port 5444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --provider-name "Multimaster Synchronization" |
| | | --domain-name "dc=example,dc=com" |
| | | --set assured-type:safe-data |
| | | --set assured-sd-level:1 |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </step> |
| | | </procedure> |
| | | |
| | |
| | | domain.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-replication-domain-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --provider-name "Multimaster Synchronization" |
| | | --domain-name "dc=example,dc=com" |
| | | --set assured-type:safe-read |
| | | -X -n |
| | | --trustAll |
| | | --no-prompt |
| | | |
| | | $ dsconfig |
| | | -p 5444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-replication-domain-prop |
| | | --port 5444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --provider-name "Multimaster Synchronization" |
| | | --domain-name "dc=example,dc=com" |
| | | --set assured-type:safe-read |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </step> |
| | | </procedure> |
| | | |
| | |
| | | attributes.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-replication-domain-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --provider-name "Multimaster Synchronization" |
| | | --domain-name "dc=example,dc=com" |
| | | -X -n |
| | | --trustAll |
| | | --no-prompt |
| | | --set |
| | | fractional-include:inetorgperson:cn,givenname,mail,mobile,sn,telephonenumber</screen> |
| | | |
| | |
| | | <literal>sessionToken</literal> from being replicated.</para> |
| | | |
| | | <screen>dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-replication-domain-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --provider-name "Multimaster Synchronization" |
| | | --domain-name "dc=example,dc=com" |
| | | --set fractional-exclude:*:sessionToken |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | |
| | | <para>This last example only works if you first define a |
| | | <literal>sessionToken</literal> attribute in the directory server |
| | |
| | | the publicly visible data available before any changes have been |
| | | made.</para> |
| | | |
| | | <screen>$ ldapsearch -b cn=changelog -p 1389 "(objectclass=*)" \* + |
| | | <screen>$ ldapsearch --baseDN cn=changelog --port 1389 "(objectclass=*)" \* + |
| | | dn: cn=changelog |
| | | cn: changelog |
| | | objectClass: top |
| | |
| | | for the last of the two changes.</para> |
| | | |
| | | <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" |
| | | --baseDN cn=changelog |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --control "1.3.6.1.4.1.26027.1.5.4:false" |
| | | "(objectclass=*)" |
| | | \* + |
| | | dn: cn=changelog |
| | |
| | | <para>Here the changes are base64 encoded, so you can decode them using |
| | | the <command>base64</command> command.</para> |
| | | |
| | | <screen>$ base64 decode -d b2JqZW...ZmlnCg== |
| | | <screen>$ base64 decode --encodedData b2JqZW...ZmlnCg== |
| | | objectClass: person |
| | | objectClass: top |
| | | cn: Horace Velmont |
| | |
| | | <para>In this example, a description was added to Babs Jensen's entry.</para> |
| | | |
| | | <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: |
| | | --baseDN cn=changelog |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --control "1.3.6.1.4.1.26027.1.5.4:false: |
| | | dc=example,dc=com:0000013087cbc34a12d100000002;" |
| | | "(objectclass=*)" |
| | | \* + |
| | |
| | | |
| | | <para>If we base64-decode the changes, we see the following.</para> |
| | | |
| | | <screen>$ base64 decode -d YWRkO...gotCg== |
| | | <screen>$ base64 decode --encodedData YWRkO...gotCg== |
| | | add: description |
| | | description: A third change |
| | | - |
| | |
| | | add: ds-rlim-size-limit |
| | | ds-rlim-size-limit: 10 |
| | | |
| | | $ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -f limit.ldif |
| | | $ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --filename limit.ldif |
| | | Processing MODIFY request for uid=bjensen,ou=People,dc=example,dc=com |
| | | MODIFY operation successful for DN uid=bjensen,ou=People,dc=example,dc=com</screen> |
| | | |
| | |
| | | subtreeSpecification: {base "ou=people", specificationFilter " |
| | | (isMemberOf=cn=Directory Administrators,ou=Groups,dc=example,dc=com)" } |
| | | |
| | | $ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -a -f grouplim.ldif |
| | | $ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --defaultAdd |
| | | --filename grouplim.ldif |
| | | Processing ADD request for |
| | | cn=Remove Administrator Search Limits,dc=example,dc=com |
| | | ADD operation successful for DN |
| | |
| | | </step> |
| | | <step> |
| | | <para>Check the results.</para> |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com uid=kvaughan + | grep ds-rlim |
| | | <screen>$ ldapsearch --port 1389 --baseDN 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> |
| | |
| | | default, no idle time limit is set.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-global-configuration-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --set idle-time-limit:24h |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | |
| | | <para>The example shown sets the idle time limit to 24 hours.</para> |
| | | </section> |
| | |
| | | the 5 MB limit.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-connection-handler-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --handler-name "LDAP Connection Handler" |
| | | --set max-request-size:20mb |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | |
| | | <para>The example shown sets the maximum request size on the LDAP connection |
| | | handler to 20 MB.</para> |
| | |
| | | uid: samba-admin |
| | | userPassword: password |
| | | |
| | | $ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -a -f samba.ldif |
| | | $ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --defaultAdd |
| | | --filename samba.ldif |
| | | Processing ADD request for uid=samba-admin,ou=Special Users,dc=example,dc=com |
| | | ADD operation successful for DN uid=samba-admin,ou=Special Users, |
| | | dc=example,dc=com</screen> |
| | |
| | | Samba Admin user rights"; allow(all) groupdn ="ldap:///uid=samba-user,ou= |
| | | Special Users,dc=example,dc=com";) |
| | | |
| | | $ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -f samba-rights.ldif |
| | | $ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --filename samba-rights.ldif |
| | | Processing MODIFY request for uid=samba-admin,ou=Special Users,dc=example,dc=com |
| | | MODIFY operation successful for DN uid=samba-admin,ou=Special Users,dc=example,dc=com |
| | | Processing MODIFY request for dc=example,dc=com |
| | |
| | | <step> |
| | | <para>Enable the plugin.</para> |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | create-plugin |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --plugin-name "Samba Password Synchronisation" |
| | | --type samba-password |
| | | --set enabled:true |
| | | --set pwd-sync-policy:sync-nt-password |
| | | --set |
| | | samba-administrator-dn:"uid=samba-admin,ou=Special Users,dc=example,dc=com" |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | <para>At this point the Samba Password plugin is active.</para> |
| | | </step> |
| | | <step performance="optional"> |
| | | <para>When troubleshooting Samba Password plugin issues, you can turn on |
| | | debug logging as follows.</para> |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | create-debug-target |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --publisher-name "File-Based Debug Logger" |
| | | --target-name org.opends.server.plugins.SambaPasswordPlugin |
| | | --set debug-level:all |
| | | -X -n |
| | | --trustAll |
| | | --no-prompt |
| | | $ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-log-publisher-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --publisher-name "File-Based Debug Logger" |
| | | --set enabled:true |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </step> |
| | | </procedure> |
| | | </chapter> |
| | |
| | | add: myCustomAttribute |
| | | myCustomAttribute: Testing 1, 2, 3... |
| | | |
| | | $ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -f custom-attr.ldif |
| | | $ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --filename custom-attr.ldif |
| | | Processing MODIFY request for uid=bjensen,ou=People,dc=example,dc=com |
| | | MODIFY operation successful for DN uid=bjensen,ou=People,dc=example,dc=com |
| | | $ ldapsearch -p 1389 -b dc=example,dc=com uid=bjensen myCustomAttribute |
| | | $ ldapsearch |
| | | --port 1389 |
| | | --baseDN dc=example,dc=com |
| | | uid=bjensen |
| | | myCustomAttribute |
| | | dn: uid=bjensen,ou=People,dc=example,dc=com |
| | | myCustomAttribute: Testing 1, 2, 3... |
| | | </screen> |
| | |
| | | than reject entries having this issue.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -h `hostname` |
| | | -p 4444 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-global-configuration-prop |
| | | --hostname `hostname` |
| | | --port 4444 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --set single-structural-objectclass-behavior:warn |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | |
| | | <para>You can allow attribute values that do not respect the defined syntax |
| | | with the <command>dsconfig</command> command as well.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -h `hostname` |
| | | -p 4444 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-global-configuration-prop |
| | | --hostname `hostname` |
| | | --port 4444 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --set invalid-attribute-syntax-behavior:warn |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | |
| | | <para>You can even turn off schema checking altogether, although turning |
| | | off schema checking only really makes sense when you are absolutely sure |
| | |
| | | processing.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -h `hostname` |
| | | -p 4444 |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-global-configuration-prop |
| | | --hostname `hostname` |
| | | --port 4444 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --set check-schema:false |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </section> |
| | | |
| | | <section xml:id="standard-schema"> |
| | |
| | | <listitem> |
| | | <para>(UNIX) Create an RC script, and then use the script to start |
| | | the server.</para> |
| | | <para>Unless you run OpenDJ as root, use the -u |
| | | <para>Unless you run OpenDJ as root, use the --userName |
| | | <replaceable>userName</replaceable> option to specify the user |
| | | who installed OpenDJ.</para> |
| | | <screen>$ sudo OpenDJ/bin/create-rc-script -f /etc/init.d/opendj -u mark |
| | | <screen>$ sudo OpenDJ/bin/create-rc-script |
| | | --outputFile /etc/init.d/opendj |
| | | --userName 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 |
| | |
| | | <listitem> |
| | | <para>(UNIX) Create an RC script, and then use the script to stop |
| | | the server.</para> |
| | | <screen>$ sudo OpenDJ/bin/create-rc-script -f /etc/init.d/opendj -u mark |
| | | <screen>$ sudo OpenDJ/bin/create-rc-script |
| | | --outputFile /etc/init.d/opendj |
| | | --userName mark |
| | | [sudo] password for mark: |
| | | $ sudo /etc/init.d/opendj stop</screen> |
| | | </listitem> |
| | |
| | | <listitem> |
| | | <para>(UNIX) Create an RC script, and then use the script to stop |
| | | the server.</para> |
| | | <screen>$ sudo OpenDJ/bin/create-rc-script -f /etc/init.d/opendj -u mark |
| | | <screen>$ sudo OpenDJ/bin/create-rc-script |
| | | --outputFile /etc/init.d/opendj |
| | | --userName mark |
| | | [sudo] password for mark: |
| | | $ /etc/init.d/opendj restart</screen> |
| | | </listitem> |
| | |
| | | reject such entries being added, set the property as follows.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-global-configuration-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --set single-structural-objectclass-behavior:warn |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | |
| | | <para>By default, OpenDJ also checks syntax for a number of attribute types. |
| | | You can relax this behavior as well by using the <command>dsconfig |
| | |
| | | from LDIF.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-backend-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --backend-name userRoot |
| | | --set entries-compressed:true |
| | | -X -n |
| | | --trustAll |
| | | --no-prompt |
| | | $ 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 |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --ldifFile /path/to/Example.ldif |
| | | --backendID userRoot |
| | | --baseDN dc=example,dc=com |
| | | --start 0 |
| | | Import task 20110627101758486 scheduled to start Jun 27, 2011 10:17:58 AM CEST</screen> |
| | | </section> |
| | | |
| | |
| | | <literal>preload-time-limit</literal> for the backend.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-backend-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --backend-name userRoot |
| | | --set preload-time-limit:30m |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | |
| | | <para>Database pre-load is single-threaded, and loads each database one |
| | | at a time.</para> |
| | |
| | | group membership, you could cache your group entries.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | create-entry-cache |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --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> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </section> |
| | | |
| | | <section xml:id="perf-logging"> |
| | |
| | | messages. Consider disabling the access log in such cases.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -p 4444 |
| | | -h `hostname` |
| | | -D "cn=Directory Manager" |
| | | -w password |
| | | set-log-publisher-prop |
| | | --port 4444 |
| | | --hostname `hostname` |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --publisher-name "File-Based Access Logger" |
| | | --set enabled:false |
| | | -X -n</screen> |
| | | --trustAll |
| | | --no-prompt</screen> |
| | | </section> |
| | | </section> |
| | | </chapter> |
| | |
| | | <para>These virtual attributes are typically operational, so you get them |
| | | back from a search only when you request them.</para> |
| | | |
| | | <screen>$ ldapsearch -p 1389 -b dc=example,dc=com dc=example |
| | | <screen>$ ldapsearch --port 1389 --baseDN dc=example,dc=com dc=example |
| | | dn: dc=example,dc=com |
| | | dc: example |
| | | objectClass: domain |
| | | objectClass: top |
| | | |
| | | $ ldapsearch -p 1389 -b dc=example,dc=com dc=example numSubordinates |
| | | $ ldapsearch --port 1389 --baseDN dc=example,dc=com dc=example numSubordinates |
| | | dn: dc=example,dc=com |
| | | numSubordinates: 4 |
| | | </screen> |
| | |
| | | replicated.</para> |
| | | |
| | | <screen>$ dsconfig |
| | | -h `hostname` |
| | | -p 4444 -D |
| | | "cn=Directory Manager" |
| | | -w password |
| | | create-virtual-attribute |
| | | --hostname `hostname` |
| | | --port 4444 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --name "Served By Description" |
| | | --type user-defined |
| | | --set enabled:true |
| | | --set attribute-type:description |
| | | --set base-dn:dc=example,dc=com |
| | | --set value:"Served by OpenDJ.Example.com" |
| | | -X -n |
| | | $ ldapsearch -p 1389 -b dc=example,dc=com uid=bjensen description |
| | | --trustAll |
| | | --no-prompt |
| | | $ ldapsearch --port 1389 --baseDN dc=example,dc=com uid=bjensen description |
| | | dn: uid=bjensen,ou=People,dc=example,dc=com |
| | | description: Served by OpenDJ.Example.com |
| | | </screen> |
| | |
| | | ILIARY MAY ( classOfService $ diskQuota $ mailQuota ) X-ORIGIN 'OpenDJ Doc |
| | | umentation Examples' ) |
| | | |
| | | $ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -f quotas.ldif |
| | | $ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --filename quotas.ldif |
| | | Processing MODIFY request for cn=schema |
| | | MODIFY operation successful for DN cn=schema</screen> |
| | | |
| | |
| | | <para>You can add the collective attribute subentries by using the |
| | | <command>ldapmodify</command> command.</para> |
| | | |
| | | <screen>$ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -a -f cos.ldif |
| | | <screen>$ ldapmodify |
| | | --port 1389 |
| | | --bindDN "cn=Directory Manager" |
| | | --bindPassword password |
| | | --defaultAdd |
| | | --filename 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 |
| | |
| | | user entries.</para> |
| | | |
| | | <screen>$ ldapsearch |
| | | -p 1389 |
| | | -b dc=example,dc=com |
| | | --port 1389 |
| | | --baseDN dc=example,dc=com |
| | | uid=bjensen |
| | | classOfService mailQuota diskQuota |
| | | dn: uid=bjensen,ou=People,dc=example,dc=com |
| | |
| | | diskQuota: 10 GB |
| | | |
| | | $ ldapsearch |
| | | -p 1389 |
| | | -b dc=example,dc=com |
| | | --port 1389 |
| | | --baseDN dc=example,dc=com |
| | | uid=kvaughan |
| | | classOfService mailQuota diskQuota |
| | | dn: uid=kvaughan,ou=People,dc=example,dc=com |
| | |
| | | diskQuota: 50 GB |
| | | |
| | | $ ldapsearch |
| | | -p 1389 |
| | | -b dc=example,dc=com |
| | | --port 1389 |
| | | --baseDN dc=example,dc=com |
| | | uid=scarter |
| | | classOfService mailQuota diskQuota |
| | | dn: uid=scarter,ou=People,dc=example,dc=com |