Skip to content

Convert csv to ldif format for easy test user creation (ex.: contoso.com)

License

Notifications You must be signed in to change notification settings

Nordes/Csv2Ldif

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create ldif from csv and the LDIF can be used with the basic OpenLDAP.

Default password

Value: P@ss1W0Rd!

Help

Usage: index.js <inputCsvFile.csv> [options]

Options:
  --help            Show help                                          [boolean]
  --version         Show version number                                [boolean]
  -o, --output      Output file                              [default: "output"]
  --bdn, --baseDN   Base dn (i.e.: dc=contoso,dc=com)
                                                  [default: "dc=contoso,dc=com"]
  -u, --users       Users OU before the base dn. (i.e.: ou=users)
                                                           [default: "ou=users"]
  -g, --groups      Groups OU before the base dn. (i.e.: ou=groups)
                                                          [default: "ou=groups"]
  --hp, --password  Default hashed password for the users. If not set,
                    P@ss1W0Rd! will be used
                                  [default: "{SHA}RKkNn7+KoG94IN3x/B2jnm/4DS0="]
  -s, --seed        The see used to generate the gidNumber and uidNumber.
                                                                [default: 70000]

Examples:
  index.js -o outputBaseName  Output the results from the csv into the
                              'outputBaseName' (01-outputBaseName-groups.ldif &
                              02-outputBaseName-users.ldif) files

Example

Output

File Desc.
01-filePrefix-groups.ldif Generation for the groups
02-filePrefix-users.ldif Generation for the user and also do the membership with the groups

Example: Once imported

image

Stuff to look

About

Convert csv to ldif format for easy test user creation (ex.: contoso.com)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published