Newer
Older
skyldap / README.md
@One One on 20 Apr 2022 1 KB documentation

SkyLDAP

Automatically create users in LDAP directory

Usage

Install dependencies (Python 3)

pip install -r requirements.txt

Put all user information into data/import/*.csv

Set LDAP fields in CSV file, uid,cn is required, autocomplete plugins will try to complete other missing fields

Example:

uid,cn
test,TestAccount
test2,AnotherTestAccount

Other plugins may fill uid,cn by other fields, like using employeeNumber

Example:

employeeNumber
10000000
10000001

Run script

python batch_add.py

Results can be seen in data/import_result/*.csv

Configuration

Config files inside data/config.json

{
    "server": "10.0.0.2",  // server ip
    "userdn": "cn=admin,dc=company,dc=local",  // admin (used to add account) dn
    "userpassword": "something",  // admin password
    "template_dn": "uid=dummy,ou=people,dc=company,dc=local",  // a user dn, used as template for all new users

    // autocomplete plugin options
    "AutocompleteMail": {
        "base": "@company.local"
    }
}