summaryrefslogtreecommitdiff
path: root/utils/list-attribute-indexes.sh
diff options
context:
space:
mode:
Diffstat (limited to 'utils/list-attribute-indexes.sh')
-rwxr-xr-xutils/list-attribute-indexes.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/utils/list-attribute-indexes.sh b/utils/list-attribute-indexes.sh
new file mode 100755
index 0000000..24eb209
--- /dev/null
+++ b/utils/list-attribute-indexes.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+ . ./settings.sh
+
+for ldbm_cn in `ldapsearch -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}" -b "cn=ldbm database,cn=plugins,cn=config" -s one -LLL "(objectclass=nsBackendInstance)" cn | grep ^cn: | awk '{print $2}'`; do
+ echo "ldbm database: ${ldbm_cn}"
+
+ ldapsearch -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}" -b "cn=index,cn=${ldbm_cn},cn=ldbm database,cn=plugins,cn=config" -s one -LLL
+done