nethserver-usercsvimport/README.md

18 lines
850 B
Markdown
Raw Normal View History

2015-10-18 15:06:28 +00:00
# nethserver-usercsvimport
2015-10-18 15:20:08 +00:00
Batch import a lot of users and groups.
You need a CSV file with this layout:
2016-03-30 21:19:15 +00:00
username Firstname Lastname password group1 [group2] [group3] [groupN]
2015-10-18 15:20:08 +00:00
See test.csv file for a sample.
You can use the TAB as a separator (this is the default), or whatever character you want.
2016-03-30 21:19:15 +00:00
Beware that Microsoft Excel uses the semicolon (;) as a separator instead the comma (,) for a CSV file (COMMA separated value).
2015-10-18 15:20:08 +00:00
To import, simply call the script, by passing the CSV file as a parameter and the separator as the second parameter.
./importa_utenti.pl test.CSV
./importa_utenti.pl test.CSV ";"
./importa_utenti.pl test.CSV ","
2016-03-30 21:19:15 +00:00
The import process will create all non-existing groups. If the user already exists then the line is skipped (so if you specify a nonexistent group for this user, the group won't be created).