Results 1 to 8 of 8

Thread: Bulk provisionning with template

  1. #1
    Join Date
    Aug 2014
    Posts
    8
    Rep Power
    1

    Talking [SOLVED] Bulk provisionning with template

    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

    Code:
    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 :

    Code:
    # 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 :

    Code:
    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.
    Last edited by whybugmenot; 08-13-2014 at 07:06 AM. Reason: Solved

  2. #2
    Join Date
    Aug 2014
    Posts
    8
    Rep Power
    1

    Default

    I allow myself to up the topics as it seems to get some traffic but no answer at all.

  3. #3
    Join Date
    Apr 2008
    Location
    New Paltz, NY
    Posts
    336
    Rep Power
    7

    Default

    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.
    ---
    Paul Chauvet
    State University of New York at New Paltz

  4. #4
    Join Date
    Aug 2014
    Posts
    8
    Rep Power
    1

    Default

    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

  5. #5
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    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/migrati...ript-help.html
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  6. #6
    Join Date
    Aug 2014
    Posts
    8
    Rep Power
    1

    Default

    Quote Originally Posted by phoenix View Post
    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
    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

  7. #7
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Quote Originally Posted by whybugmenot View Post
    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
    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 bugzilla and see what the developers think of it.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  8. #8
    Join Date
    Aug 2014
    Posts
    8
    Rep Power
    1

    Default

    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:

    Code:
    #get the id of the created COS with the command
    zmprov gc <CLASS FOF SERVICE NAME>
    #and bulkprovision with the command 
    zmprov ca name@domain.com <password> zimbraCOSid <ID of the COS>
    If I wrote a script I will post it here.
    Thanks for all the people who help me on that.

    Zmprov Examples - Zimbra :: Wiki

Similar Threads

  1. template
    By pdagrafica in forum Italian
    Replies: 2
    Last Post: 01-10-2012, 07:14 AM
  2. Problem when provisionning contacts on account
    By guillaume in forum Administrators
    Replies: 0
    Last Post: 06-10-2008, 01:58 AM
  3. bulk user provisionning with passwd2zmprov
    By nahmsath in forum Administrators
    Replies: 4
    Last Post: 06-06-2008, 09:13 AM
  4. bulk user provisionning with passwd2zmprov
    By nahmsath in forum Users
    Replies: 2
    Last Post: 06-06-2008, 08:44 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •