diff --git a/README.md b/README.md new file mode 100644 index 0000000..c65ddff --- /dev/null +++ b/README.md @@ -0,0 +1,56 @@ +# 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` + +```jsonc +{ + "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" + } +} +``` \ No newline at end of file