Page 1 of 1

Way to import 100+ new users?

Posted: 23 Jun 2015 21:51
by cam
Is there a way to import new users in EFA from like a CSV file instead of having to manually create 100+ new users?

Re: Way to import 100+ new users?

Posted: 23 Jun 2015 22:36
by shawniverson
No tool exists for this (yet), but I could create one if you are interested.

Re: Way to import 100+ new users?

Posted: 24 Jun 2015 20:46
by cam
That would be wonderful Shawn. We need to add around 160 users and would be nice if we could do a csv or something of the sort to import instead of having to manually create each one. How long would something like that take?

Re: Way to import 100+ new users?

Posted: 25 Jun 2015 15:02
by shawniverson
Shouldn't take very long at all. This weekend?

Re: Way to import 100+ new users?

Posted: 25 Jun 2015 17:18
by cam
yeah, that would be awesome!

Re: Way to import 100+ new users?

Posted: 29 Jun 2015 21:17
by cam
Hey Shawn, no rush, but just checking back with you on this. Thanks!

Re: Way to import 100+ new users?

Posted: 30 Jun 2015 16:50
by bob.lenz
I was just looking to see if there was such a thing as csv import. Thanks for any tool you can create!

Re: Way to import 100+ new users?

Posted: 30 Jun 2015 21:47
by shawniverson
Almost ready. Testing it now.

Re: Way to import 100+ new users?

Posted: 01 Jul 2015 14:30
by cdburgess75
Just FYI:

A tool would be awesome. But just wanted to share that I have been able to do this with MS Excel and Webmin. Webmin is a tool that EFA has installed that allows you to dig right to the users mysql table and download the CSV, then edit it and upload. Its very easy to do. A tool would be great, but keep in mind for other areas in mysql that you may want to edit one day (ex:blacklist etc)

/dave

Re: Way to import 100+ new users?

Posted: 02 Jul 2015 02:19
by shawniverson
Import script is ready :)

Code: Select all

wget https://raw.githubusercontent.com/E-F-A/v3/master/tools/userimport.sh
chmod ugo+x userimport.sh
To use, create your user.csv file as follows:

username,password,fullname,type

where type = U | A | D

U=user
A=admin
D=domain admin

To append new users:

Code: Select all

sudo /path/to/userimport.sh -f user.csv -a
To overwrite users (except admins and domain admins):

Code: Select all

sudo /path/to/userimport.sh -f user.csv -o
Please note that the csv file is not thoroughly validated. Certain characters, such as a ' or other special characters require proper escaping.
Back up prior to using!

Re: Way to import 100+ new users?

Posted: 11 Nov 2016 19:01
by webguyz
Will this work with the current version 3.0.1.5?

This post if over a year old and wondering if password encryption had changed or not.

Thanks!!

Update: I did try it with 3.0.1.5 and it did work, but the password field looks different but I was able to log in, probably because the default uses more then just md5 encryption, but it did work. I have an attachment that shows the pw's from the import (hilited in yellow) compared to the users added thru user manager in Mailwatch.

Re: Way to import 100+ new users?

Posted: 12 Jan 2017 19:15
by ktan
Is there a way to import users that will be ldap integrated? Have a multi domain EFA configuration using different LDAP servers, but would like to create users without having to have them all log in separately.