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
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.
- Node v7.0+
Clone the GitHub repository locally by executing :
git clone git@github.com:QNimbus/LDAPImporter.git
Install Node dependencies with :
npm install
Running the unit tests is done with :
npm test
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
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 |
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- B. van Wetten - Initial work - BeSquared
This project is licensed under the MIT License - see the LICENSE.md file for details