Zimbra 7 Bulk Provision

Looking to migrate to ZCS? Ask here. Got a great tip or script that helped you migrate? Post it here.
n.bochev
Posts: 25
Joined: Sat Sep 13, 2014 12:39 am

Zimbra 7 Bulk Provision

Postby n.bochev » Tue Feb 15, 2011 9:51 am

Hello,
As far as i can see the Bulk Provisioning feature is not available anymore. What's the recommended substitution for it ?
Thanks.


dlbewley
Advanced member
Advanced member
Posts: 82
Joined: Fri Sep 12, 2014 10:15 pm

Zimbra 7 Bulk Provision

Postby dlbewley » Wed Feb 16, 2011 11:17 pm

As in Bulk Provisioning - Zimbra :: Wiki ?

Why do you say that? ZCS 7 still has zmprov.
n.bochev
Posts: 25
Joined: Sat Sep 13, 2014 12:39 am

Zimbra 7 Bulk Provision

Postby n.bochev » Thu Feb 17, 2011 12:19 am

Hey,
I'm talking about the Bulk Provision zimlet. I can't make it work in zimbra 7 ( it does not show up at all ). It was an easy way to create a lot of accounts. I know there's a new Migration Wizard option, but i can't find anywhere how to import normal ( not exchange or zimbra ) accounts in a xml in it.
anpl
Posts: 2
Joined: Sat Sep 13, 2014 1:51 am

Zimbra 7 Bulk Provision

Postby anpl » Wed Feb 23, 2011 3:28 am

[quote user="n.bochev"]Hey,
I'm talking about the Bulk Provision zimlet. I can't make it work in zimbra 7 ( it does not show up at all ). It was an easy way to create a lot of accounts. I know there's a new Migration Wizard option, but i can't find anywhere how to import normal ( not exchange or zimbra ) accounts in a xml in it.[/QUOTE]

Hi,
Were you able to bulk import from a CSV?

Can you please share the steps if you have done that.
Thanks in advance
n.bochev
Posts: 25
Joined: Sat Sep 13, 2014 12:39 am

Zimbra 7 Bulk Provision

Postby n.bochev » Wed Feb 23, 2011 8:14 am

No, unfortunately i cannot make it work in zimbra 7.
gyt
Posts: 7
Joined: Fri Sep 12, 2014 11:42 pm

Zimbra 7 Bulk Provision

Postby gyt » Wed Feb 23, 2011 8:59 am

use this script and it will all users:

1 - add all users information in a txt file and name it users.txt

2- users.txt should contains information like this example:

username:user_password:First Name Lastname

3- copy users.txt to server tmp folder

4- create bash script and name it users.sh on tmp folder contains this script

#!/bin/sh

INFILE=users.txt

DOMAIN=domain.com

for line in $(seq 1 `cat $INFILE | wc -l`); do

LINE=`cat $INFILE | head -$line | tail -1`

username=`echo $LINE | cut -d: -f1`

password=`echo $LINE | cut -d: -f2`

fullname="`echo $LINE | cut -d: -f3`"

firstname=`echo $fullname | cut -d" " -f1`

lastname=`echo $fullname | awk -F' ' '{print $NF}'`

echo zmprov createAccount $username@$DOMAIN $password displayName ""$fullname"" sn $lastname givenName $firstname

done
5- change domain.com to your domain

6- chmod 777 users.txt users.sh

7- su zimbra

8- run users.sh from tmp folder like this : [zimbra@email tmp]$ ./users.sh >final.sh

9- final.sh file will be created, after finish change file mode to be like chmod 777 final.sh

10- run the final.sh file and you will get all users added to zimbra
enjoy
n.bochev
Posts: 25
Joined: Sat Sep 13, 2014 12:39 am

Zimbra 7 Bulk Provision

Postby n.bochev » Wed Feb 23, 2011 9:03 am

[quote user="gyt"]use this script and it will all users:

1 - add all users information in a txt file and name it users.txt

2- users.txt should contains information like this example:

username:user_password:First Name Lastname

3- copy users.txt to server tmp folder

4- create bash script and name it users.sh on tmp folder contains this script

#!/bin/sh

INFILE=users.txt

DOMAIN=domain.com

for line in $(seq 1 `cat $INFILE | wc -l`); do

LINE=`cat $INFILE | head -$line | tail -1`

username=`echo $LINE | cut -d: -f1`

password=`echo $LINE | cut -d: -f2`

fullname="`echo $LINE | cut -d: -f3`"

firstname=`echo $fullname | cut -d" " -f1`

lastname=`echo $fullname | awk -F' ' '{print $NF}'`

echo zmprov createAccount $username@$DOMAIN $password displayName ""$fullname"" sn $lastname givenName $firstname

done
5- change domain.com to your domain

6- chmod 777 users.txt users.sh

7- su zimbra

8- run users.sh from tmp folder like this : [zimbra@email tmp]$ ./users.sh >final.sh

9- final.sh file will be created, after finish change file mode to be like chmod 777 final.sh

10- run the final.sh file and you will get all users added to zimbra
enjoy[/QUOTE]
Yeh, i have written a more elaborate script in python, that's not really my point. I haven't seen changelog that the Bulk Import is deprecated etc, and i liked how you can add users through the interface , even with empty passwords etc.
matnor
Advanced member
Advanced member
Posts: 69
Joined: Fri Sep 12, 2014 10:30 pm

Zimbra 7 Bulk Provision

Postby matnor » Mon Jun 06, 2011 3:56 am

Any update on this ? Bulk provisioning is very important to us since we need to create few thousand students id..

Return to “Migration”

Who is online

Users browsing this forum: No registered users and 3 guests