Novell Home

CSV to LDIF Converter

Novell Cool Solutions: Cool Tool

Rate This Page

Reader Rating  stars  from 9 ratings

Digg This - Slashdot This

In Brief

Convert CSV file into a formatted LDIF file for importing into LDAP.

Vitals

Product Categories:
  • eDirectory
  • Updated:9 Nov 2006
    File Size:4.6KB
    License:Free
    Download:/coolsolutions/tools/downloads/csv2ldif.zip
    Publisher:Bryan Green, Jody Greene

    Disclaimer

    Please read the note from our friends in legal before using this file.


    Details

    This perl script will convert your CSV file into a formatted LDIF file for importing into LDAP. At a minimum you will need the objects DN.

    The 3/10/05 revision corrects the handling of embedded commas, as well as the order of fields is now irrelevant.

    Updated Nov. 9, 2006 by Bryan Green with permission of original author, Jody Greene.

    • Changed the input from command line arguments to user prompts (for our administrators, it was easier this way)
    • On both scripts, I've hard coded the LDIF version to a value of 1.
    • On both scripts, I've hard coded the changetype (fixdata2.pl is modify and adddata2.pl is add). I'm certainly not a Perl programmer but these could probably be combined to one script and the user prompted for the changetype.
    • The output file is now simply the input file name with .LDIF appended so that you can create multiple import files w/o having to rename fixdata.ldif.

    Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

    Reader Comments

    • Useful start
    • There is a utility called NCSV2LDF that performs this job very well and has been around for years.
    • very useful
    • No instructions provided whatsoever. If you can work out how to use this script, you probably don't need it.
    • At a minimum you will need the objects DN, and SN which is a required attribute under eDir
    • 1. NCSV2LDF is a Windows EXE, not a nice modifiable, readable PORTABLE PERL script like this.
      2. DOCUMENTATION!!! DOCUMENTATION!!! DOCUMENTATION!!! NEEDS DOCUMENTATION!!!

    Novell® Making IT Work As One

    © 2008 Novell, Inc. All Rights Reserved.