No Description

Bachir Soussi Chiadmi c5b428cb22 fixed user_name bug 6 months ago
LICENSE 7077a92ce9 added readme & license 6 months ago
csv2ynhusers.py c5b428cb22 fixed user_name bug 6 months ago
listynhusers.csv 8b4ecebe68 username cleaning, debug option 6 months ago
mail_template.txt ff0b23caca added option check, mailing template 6 months ago
readme.md f35102eef6 readme 6 months ago

readme.md

Import yunohost users from csv file

disclaimer

use this script at your own risks

this script is not an official part of yunohost

with 300+ users your ldap database may reach his maxsize limit see here, you may have to tweek it

csv model

nom;prenom;id;mail
nomun;prenomun;100000;truc1@machin.com
nomdeux;prenomdeux;200000;truc2@machin.com
nomtrois;prenomtrois;300000;truc3@machin.com
...

How to

csv2ynhusers.py  [--mailing -t|--template=MAILINGTEMPLATEFILE.txt] [--debug] --create (-f|--file=FILE.csv) (-d|--domain=DOMAIN.TLD) [--group=AGROUP] | --delete```

### create
```sh
./csv2ynhusers.py --create --file=mycsvfile.csv --domain=mydomain.tld --group=mychosengroup

create with mailing

$ ./csv2ynhusers.py --create --file=mycsvfile.csv --group=etudiants --domain=esadhar.net --mailing --template=mailtemplate.txt

delete

./csv2ynhusers.py --delete --file=mycsvfile.csv