[SOLVED] Bulk provisionning with template

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
whybugmenot
Posts: 7
Joined: Sat Sep 13, 2014 3:56 am

[SOLVED] Bulk provisionning with template

Post by whybugmenot »

Hello,

I use zimbra 8.0.7 OSE on ubuntu 12.04 and I want to create what could be considerer as template to do some bulk provisionning.

I know I can use
zmprov ga name@domain.com
to extract all the attributes of a user, now what I want is to create a script with zmprov instruction from that output.
admit I get this :


# name name@zimbra.domain.fr

cn: domain

displayName: domain

mail: name@zimbra.domain.fr

objectClass: inetOrgPerson

objectClass: zimbraAccount

objectClass: amavisAccount

sn: domain

uid: name

userPassword: VALUE-BLOCKED

zimbraAccountStatus: active

zimbraAdminAuthTokenLifetime: 12h

zimbraAllowAnyFromAddress: FALSE

zimbraArchiveAccountDateTemplate: yyyyMMdd

zimbraAttachmentsBlocked: FALSE

zimbraAuthTokenLifetime: 2d

zimbraBatchedIndexingSize: 20

zimbraCalendarCalDavSharedFolderCacheDuration: 1m

zimbraContactAutoCompleteEmailFields: email,email2,email3,workEmail1,workEmail2,workEmail3

zimbraContactAutoCompleteMaxResults: 20

zimbraContactEmailFields: email,email2,email3,email4,email5,email6,email7,email8,email9,email10,workEmail1,workEmail2,workEmail3

zimbraContactMaxNumEntries: 10000

zimbraContactRankingTableSize: 200



I want to transform all those line to something looking like :
zmprov ca user2@domain.com

zmprov zimbraAdminAuthTokenLifetime: 12h

zmprov zimbraAllowAnyFromAddress: FALSE

zmprov zimbraArchiveAccountDateTemplate: yyyyMMdd

zmprov zimbraAttachmentsBlocked: FALSE

zmprov zimbraAuthTokenLifetime: 2d

zmprov zimbraBatchedIndexingSize: 20

zmprov zimbraCalendarCalDavSharedFolderCacheDuration: 1m

zmprov zimbraContactAutoCompleteEmailFields: email,email2,email3,workEmail1,workEmail2,workEmail3

zmprov zimbraContactAutoCompleteMaxResults: 20

zmprov zimbraContactEmailFields: email,email2,email3,email4,email5,email6,email7,email8,email9,email10,workEmail1,workEmail2,workEmail3

zmprov zimbraContactMaxNumEntries: 10000

zmprov zimbraContactRankingTableSize: 200


I know this is not the real synthax but that's what I want to do so I can setup typical user extract its parmaters and then apply them to any new user.

Is there a possibility to do such a thing maybe transform the output into something correct ?
I'm open to suggestion, but I need to be able to create pseudo template and use them in script to bulk provision my server.
Best regards.
whybugmenot
Posts: 7
Joined: Sat Sep 13, 2014 3:56 am

[SOLVED] Bulk provisionning with template

Post by whybugmenot »

I allow myself to up the topics as it seems to get some traffic but no answer at all.
chauvetp
Outstanding Member
Outstanding Member
Posts: 350
Joined: Fri Sep 12, 2014 11:28 pm

[SOLVED] Bulk provisionning with template

Post by chauvetp »

Hi,
I haven't done a 'template' as you're looking for, but do have an account creation script which runs through about 6 zmprov commands per account. There are a couple things I would recommend:

- for any setting that is affected by the class of service, just edit that (or create a new COS). The majority of things in the output you gave are most likely changeable via COS.

- For the things that you need to create which are not part of the COS, just set those few things manually.
whybugmenot
Posts: 7
Joined: Sat Sep 13, 2014 3:56 am

[SOLVED] Bulk provisionning with template

Post by whybugmenot »

Well, I probably need to provision more than a hundred account some with calendar some of them without...

I'm very surprised that there's no tool to clone or "templatize" a user
phoenix
Ambassador
Ambassador
Posts: 27278
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

[SOLVED] Bulk provisionning with template

Post by phoenix »

Have you looked at any of the wiki articles or (possibly) forum threads on Bulk Provisioning there's even the zmprov cabulk command, do any of those help:
LDAP - Zimbra :: Wiki

Bulk Provisioning - Zimbra :: Wiki

http://www.zimbra.com/forums/migration/ ... -help.html
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
whybugmenot
Posts: 7
Joined: Sat Sep 13, 2014 3:56 am

[SOLVED] Bulk provisionning with template

Post by whybugmenot »

[quote user="10330phoenix"]Have you looked at any of the wiki articles or (possibly) forum threads on Bulk Provisioning there's even the zmprov cabulk command, do any of those help:
LDAP - Zimbra :: Wiki

Bulk Provisioning - Zimbra :: Wiki

Bulk Provisioning script help[/QUOTE]
Yes and those does not address the template issue only the creation part, the only thing I can think of that might answer partially my problem is this script to create domain admin in OSE

==> [HOWTO] Domain Admin rights in Zimbra OSE 8.x
phoenix
Ambassador
Ambassador
Posts: 27278
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

[SOLVED] Bulk provisionning with template

Post by phoenix »

[quote user="whybugmenot"]Yes and those does not address the template issue only the creation part, the only thing I can think of that might answer partially my problem is this script to create domain admin in OSE

==> [HOWTO] Domain Admin rights in Zimbra OSE 8.x[/QUOTE]Yes you're right, there is no template as such but I thought some of those scripts might be of help. If you think a template user for bulk creation might be useful then I'd suggest filing an RFE in [URL=bugzilla[/URL] and see what the developers think of it.
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
whybugmenot
Posts: 7
Joined: Sat Sep 13, 2014 3:56 am

[SOLVED] Bulk provisionning with template

Post by whybugmenot »

OK in fact I might not use the wrong term, but I'm suprised nobody mention it clearly but the COS is exactly what I want to do

So the answer to my question is define a class of service in the web interface corresponding to my need and then use bulk provisionning with the commands:


#get the id of the created COS with the command

zmprov gc

#and bulkprovision with the command

zmprov ca name@domain.com zimbraCOSid


If I wrote a script I will post it here.

Thanks for all the people who help me on that.
[url=Zmprov Examples - Zimbra :: Wiki[/url]
Post Reply