Live voting for the next roadmap S/MIME, Z-Files, WebRTC web meetings and tablet support http://t.co/9TaQIBAYgM
The Best Open Source Email & Collaboration Software
In this new series we want to highlight some of the scripts and tools that you can find in our Github repository called zarafa-tools. These scripts have been (partly) made on customer request and the customer allowed us to share them with the community. If you have a script or tool which is useful for other Zarafa users and you want to share them with the community please send your contribution to us, or send us a pull request through Github.
Today we want to highlight zarafa-tools / helpers / ldap_export.sh
ldap_export.sh is a cool script to validate your current LDAP configuration. It is much easier to use than ldapsearch on its own because it automatically parses your LDAP credentials and settings from your current Zarafa settings, An added benefit is the possibility to show the resulting LDAP query that is being used.
How it works
Start the script with no options to create a full LDAP export from the configured zarafa search base.
root@your-server:~/zarafa-tools/helpers/ldap# ./ldap_export.sh -h
These are the options with extra parameters:
|Option||What it does|
|-m [email address]||Queries ldap for ([$ldap_emailaddress_attribute]=[email address])|
|-u [user]||Queries ldap for ([$ldap_loginname_attribute]=[user])|
|-q [custom query]||Queries ldap with [custom query]|
|-o [value]||Override ldap_page_size with [value]|
These are the options without parameters:
|Option||What it does|
|-a||Do an anonymous bind|
|-i||Ignore ldap_page_size config option in Zarafa ldap config|
|-p||Prompt on every ldap page when needed|
|-s||Shows used ldapsearch command at the end of the execution|
|-w||Disables ldapsearch default behavior of wrapping lines after 76 characters|
|-d||Find duplicate unique attributes - (please note: not tested very well)|
|-h||Shows the help text|
As you can read above, this script is quite multi-functional. We think it would be a good addition to any sysadmin's toolkit. It's great to backup and troubleshoot your current system. And you don't have to worry any more about remembering every possible LDAP query.
Do you plan to use this script? Do you have experience with this script? We would love to read your comments!