OpenDJ
Remove OpenDJ at startup
$ sudo update-rc.d opendj remove
Set index-entry-limit
/opt/opendj/bin/dsconfig set-backend-prop \
--backend-name userRoot \
--set index-entry-limit:100000
Remove subtree
/opt/opendj/bin/ldapdelete \
--port 1636 \
--bindDN "cn=Directory Manager" \
--bindPassword password \
--trustAll \
--useSSL --noPropertiesFile \
-J 1.2.840.113556.1.4.805 \
--verbose \
o=Test,dc=example,dc=com
Get password policy prop
$ /opt/opendj/bin/dsconfig get-password-policy-prop \
--policy-name "Default Password Policy" \
--advanced -p 4444
Set allow-pre-encoded-passwords
$ ./dsconfig set-password-policy-prop \
--set allow-pre-encoded-passwords:true \
--policy-name "Default Password Policy" \
--advanced -p 4444
Get system name
$ /opt/opendj/bin/ldapsearch -D "cn=Directory Manager" \
-p 1389 \
-b "cn=System Information,cn=monitor" \
-s "base" "objectclass=*" \
systemName
dn: cn=System Information,cn=monitor
systemName: odj-2
Get multimaster synchronization info
$ /opt/opendj/bin/ldapsearch -D "cn=Directory Manager" -p 1389 \
-b "cn=Multimaster Synchronization,cn=Synchronization Providers,cn=config" \
"objectclass=ds-cfg-replication-domain" ds-cfg-replication-server ds-cfg-base-dn \
dn: cn=cn=admin data,cn=domains,cn=Multimaster Synchronization,cn=Synchronizatio
n Providers,cn=config
ds-cfg-base-dn: cn=admin data
ds-cfg-replication-server: odj-1:8989
ds-cfg-replication-server: odj-2:8989
dn: cn=cn=schema,cn=domains,cn=Multimaster Synchronization,cn=Synchronization Pr
oviders,cn=config
ds-cfg-base-dn: cn=schema
ds-cfg-replication-server: odj-1:8989
ds-cfg-replication-server: odj-2:8989
dn: cn=dc=example\,dc=com,cn=domains,cn=Multimaster Synchronization,cn=Synchroniz
ation Providers,cn=config
ds-cfg-base-dn: dc=example,dc=com
ds-cfg-replication-server: odj-1:8989
ds-cfg-replication-server: odj-2:8989
Check replication status
./ldapsearch -D "cn=Directory Manager" -p 1389 -b "cn=replication, cn=monitor" "(&(Replication-Server=odj-1:8989)(domain-name=dc=example,dc=com))" received-updates server-state
dn: cn=Connected Replication Server odj-1:8989 19125,cn=Replication Server 8989
odj-2 7724,cn=dc_example_dc_com,cn=replication,cn=monitor
server-state: 0000013e17ab073228db0000880c Wed Apr 17 13:04:44 CEST 2013 1366196
684594
server-state: 0000013e1898f744515000005fe2 Wed Apr 17 17:24:38 CEST 2013 1366212
278084
received-updates: 23570
Create a New SMTP Alert Handler
$ ./dsconfig create-alert-handler \
--handler-name "my SMTP Handler" \
--type smtp \
--set enabled:true \
--set message-body:"Alert Type: %%alert-type%%\n\nAlert ID: \
%%alert-id%%\n\nAlert Message: %%alert-message%%" \
--set message-subject:"Alert Message" \
--set recipient-address:directorymanager@example.com \
--set sender-address:OpenDS-Alerts@directory.example.com \
--hostname odj-1 --port 4444 \
--bindDN "cn=Directory Manager" --bindPassword password --no-prompt
List alert handlers
$ ./dsconfig list-alert-handlers \
--hostname odj-1 --port 4444 \
--bindDN "cn=Directory Manager" --bindPassword password --no-prompt