/LDAPImporter

Simple script to read from a CSV file and import rows into an LDAP database.

Primary LanguageJavaScriptMIT LicenseMIT

Build Status dependencies devDependencies CII Best Practices license

LDAPImporter

Simple script to read from a CSV file and import rows into an LDAP database. Script was made specificaly to import addressbook contacts into and LDAP database for use with MS Outlook

Table Of Contents

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

  • Node v7.0+

Installing

Clone the GitHub repository locally by executing :

git clone git@github.com:QNimbus/LDAPImporter.git

Install Node dependencies with :

npm install

Running the tests

Running the unit tests is done with :

npm test

Deployment

The script can be run with the following command:

npm start -- --csvFile ./contacts.csv or node --csvFile ./contacts.csv (assuming the contacts.csv file exists)

Note You can specificy command line parameters on the commandline, the environment or in the config file. See: configuration

Configuration

Copy the config.sample.js to config.js file and edit it with the parameters for your specific configuration.

Option Description
csvFile Required File location of the CSV file relative to the script

Default value: contacts.csv
Type: string
ldapProtocol Required Protocol used to connect tp the database (ldap or ldaps)

Default value: ldap
Type: string
ldapHost Required Hostname or IP address of the LDAP database server

Type: string
ldapPort Required TCP port number of LDAP database

Default value: 389
Type: int
ldapBase Required DN of the location in de LDAP database to store imported values

Example: ou=addressBook,dc=example,dc=com
Type: string
username Required Username for authentication

Example: uid=admin,cn=users,dc=example,dc=com
Type: string
password Required Password for authentication

Type: string

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details