Results 1 to 4 of 4

Thread: how to bulk import users with zmprov?

  1. #1
    Join Date
    Jun 2009
    Posts
    6
    Rep Power
    6

    Exclamation how to bulk import users with zmprov?

    Hi there,

    While deploying a new ZCS server, we created some domains, users and alias but after that we realized the FQDN initially chosen for our server wasn't appropiated so we were trying to change the hostname following http://wiki.zimbra.com/index.php?title=ZmSetServerName but we ran into too much trouble trying so we decided to reinstall.

    Before doing so we backed put the created users using the following command:

    Code:
    zmprov gaa -v > file
    After reinstalling ZCS with the new FQDN, I tried to restore our user's file using the following command

    Code:
    zmprov < file
    But I just got tons of

    Code:
    prov> Unknown command. Type: 'help commands' for a list
    And none user was imported which proved my procedure wrong. What's the right procedure to import our users list?

    Thanks in advance for your help,

    Greetings,

    leocertuche

  2. #2
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Default

    Welcome to the forums

    The output from the command you have run will not generate a file that can be directly imported back in with zmprov. The correct syntax for creating an account is
    Code:
    su - zimbra
    zmprov ca joe@domain.com test123 displayName JSmith
    which is all explained on the Wiki.

    You could try searching the forums for zmprov and csv

  3. #3
    Join Date
    Jun 2009
    Posts
    6
    Rep Power
    6

    Exclamation

    Thanks for your answer uxbod,

    I was following your advice and reading entries related to zmprov and csv, particularly the following ones but still don't know how to import the exported file

    http://www.zimbra.com/forums/adminis...ation-csv.html
    http://www.zimbra.com/forums/migrati...scripting.html
    http://www.zimbra.com/forums/adminis...t-details.html
    http://www.zimbra.com/forums/adminis...alias-etc.html

    As I mentioned, I only have the output of zmprov gaa -v to a file but I still don't know how to feed my new ZCS with the information of this file.

    Any help is much appreciated.

    Thanks in advanced,

    leocertuche

  4. #4
    Join Date
    Aug 2007
    Location
    Anchorage, AK
    Posts
    376
    Rep Power
    8

    Default

    I put all my users in a CSV file, opened it in Access and then made a quick report to spit them out. I have a txt file with the following lines:
    createAccount username@domain.com password displayName 'Firstname Lastname' givenName 'Firstname' sn 'Lastname'
    Then I just feed to to zmprov with "zmprov < userlist.txt"
    Culley
    Mail | Dell 2950III | 2x Quad Core 5420 | 8gb RAM | 6x 146gb SAS RAID 0+1 | Red Hat 5.3 | Zimbra 6.0.10 Network Edition
    Test | VMware ESXi Whitebox | Phenom II Black 3.2ghz | 12gb RAM | 6x 1tb SATA RAID 0+1 | CentOS 5.4 | FOSS, Not in use now

Similar Threads

  1. Domain alias with zmprov
    By Klug in forum Administrators
    Replies: 2
    Last Post: 03-25-2009, 08:49 AM
  2. Moving to different server
    By AaronW1000 in forum Installation
    Replies: 2
    Last Post: 07-03-2008, 08:39 AM
  3. ical4j.data.ParserException
    By amit_saini54 in forum Migration
    Replies: 0
    Last Post: 12-06-2007, 07:45 AM
  4. Import users from other LDAP directory?
    By bjdraw in forum Administrators
    Replies: 9
    Last Post: 02-13-2006, 12:02 PM

Posting Permissions

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