Download ldap-csvexport Project site
Download ldap-csvexport

ldap-csvexport.pl - a tool to easily and quickly export LDAP entries to CSV files

Member of yet another ldap-toolbox that will make your life with directory servers much easier:
ldap-preg-replace | ldap-searchEntries | ldap-csvexport | ldap-collate | csv2ldif2 | ldif-extract | ldif-preg-replace
Help this Project!

What's that?

It is a small tool written in perl that allows you to easily export arbitary LDAP entries to a flat CSV (comma separated values) file. The CSV file can then be used to synchronize other databases or to get Lists of data. CSV files can be read by applications like OpenOffice Calc or Microsoft Excel.

LDAP is a protocol used to communicate with directory servers such as OpenLDAP or Microsoft ActiveDirectory. Directory servers are database servers that store the data hierarchical instead of a tabular representation. This makes them the ideal choice for central user management, but also other demands.

What can it do?

As said above, it exports entries to csv files. It does that by performing a search operation on the server and dumping attribute values of entries to STDOUT. Most commonly, STDOUT will be simply redirected to a file, but you can of course also pipe the csv-data to some other application (like a perl script doing some magic), which makes that quite powerful.

Feature list (main features):

How does it work?

It is very simple since it runs from command line. Just download it and call it without parameters. This will give you all options that can be set. Calling it with the "-h" parameter even gives some more advice.
Additionally, you can find a more detailed documentation in the release package.

Example? sure!
This will export the groups, members count and members common name from the public LDAP at forumsys.com:

ldap-csvexport.pl -H 'ldap://ldap.forumsys.com:389/dc=example,dc=com?ou,[#]uniqueMember,uniqueMember.uid?sub?(objectClass=groupOfUniqueNames)'
"ou";"uniqueMember";"uniqueMember.uid"
"mathematicians";"5";"euclid|riemann|euler|gauss|test"
"scientists";"4";"einstein|galieleo|tesla|newton"
"italians";"1";"tesla"
Description: ou requests the name of the group, [#]uniqueMember fetches the members and counts them and finally uniqueMember.uid retrieves each members uid attribute (chained lookup). The whole lookup is specified via a RFC-2255 compliant LDAP URL (as alternative to other available command line options).
The four lines following the command is simply the CSV output, your desired data.

Where can i download this cool exporter?

You can download the latest development version from svn:
svn co https://ldap-csvexport.svn.sourceforge.net/svnroot/ldap-csvexport ldap-csvexport

Or just download the latest file release from the project page at sourceforge!

Where can i report bugs or request new Features? What about project news and screenshots?

The Sourceforge project page hosts all that. Please refer to the page for latest infos and for our forums and bug/features tracker.