LDIF Generator

Description#

The LDIF Generator will generate random, fictitious, LDIF records that can be imported into LDAP server or other applications for testing.

We have used the DBGEN.PL program and had several problems with some of the aspects of the output that was generated. The attributes that used distinguished names, DBGEN only provided RDNs for these entries. When we were working with Novell's eDirectory or with Active Directory, it actually does some referential integrity checking that would prevent the importing of DN attributes that were not valid. The LDIF Generator tool will create valid manager and secretary relationships.

In addition, we wanted to generate some large trees and demo some of the Organizational chart programs that would work against a LDAP instance that would simulate a real organization.

Out of these issues with DBGEN, we wrote LDIFGen. This is a Java program that should work with Java 1.4 or above and on "nearly" any platform that has Java.

You must generate at least 10 records. There is no maximum determined. (There could be some resource issues at very large numbers over 1,000,000) Below we show typical screen output of the tool generating about 500 entries/sec:

Generating 100000 entries.
With People entries With 40 OUs entries
Using CN in Distinguished NameIn the dc=willeke, dc=com context
For the Generic Server Type
Generating 100000 entries took 3 minute(s) 19 second(s)  or 502.513 entries/seconds

LDIF Generator now Open Source#

Github Repository

Set Up#

If you are not on Windows, can run:
java -jar LDIFGen.jar

The program expects to find the "Data" directory where the LDIFGen.jar file is located. This can be changed within the GUI.

You will need to change the following to fit your needs:

Microsoft Active Directory#

When you select Microsoft Active Directory we:

You may want to change the Data File objectclasses.txt file to be:

top
person
organizationalPerson
user

EDirectory#

When you select "eDirectory" we add objectClasses to OUs:

Data Files#

The data files are similar to the files used in DBGEN program and the files that are used for DBGEN can be used with this program. By default, the data input files are stored in the data directory in the root where the application was installed. You could modify these files to make them look more like you company or situation. The files and their uses are described as follows:

Feel free to change these files as you wish, just do not alter the format of the file.

For help with the LDIF Gen Tool Program.

Feedback and Recommendations for Improvements#

Please provide any constructive feedback or enhancement requests

Sample Output#

Generic LDIF#

Here is a few records from a sample output when using the "Generic" output:

dn: ou=Payroll,dc=willeke, dc=com
changetype: add
ou: Payroll
objectClass: top
objectClass: organizationalUnit


dn: cn=1000002, ou=Payroll, dc=willeke, dc=com
changetype: add
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
cn: 1000002
cn: KayC
sn: Kay
description: This is Chicky Kay's description
facsimileTelephoneNumber: +1 213 210-3794
l: Alameda
ou: Payroll
postalAddress: Payroll$Alameda
telephoneNumber: +1 213 993-9665
title: Elite Payroll Assistant
userPassword: Kay
uid: KayC
givenName: Chicky
mail: KayC@ns-mail4.com
carLicense: RR3XG6
departmentNumber: 8982
employeeType: Contract
homePhone: +1 213 492-4709
initials: C. K.
mobile: +1 213 915-4261
pager: +1 213 780-4510
roomNumber: 9562
secretary: cn=100135, ou=Human Resources, dc=willeke, dc=com
manager: cn=100474, ou=Administrative, dc=willeke, dc=com 

Copyright and Usage#

See our Copyright And Intellectual Property Information Be certain you have read and understand the software License before you download the software.

Java Versions And Running Programs#

If you have issues with versions, see Java Versions And Running Programs

LDIFGen Downloads#

Cool Solutions: Easily Generate LDIF File for Testing#

The Cool Solutions: Easily Generate LDIF File for Testing

More Information#

There might be more information for this subject on one of the following: