Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
 
Go Back   Zimbra - Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra - Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-28-2009, 08:11 PM
Junior Member
 
Posts: 5
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
Reply With Quote
  #2 (permalink)  
Old 06-29-2009, 12:23 AM
Moderator
 
Posts: 6,275
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
__________________
Reply With Quote
  #3 (permalink)  
Old 06-29-2009, 11:44 AM
Junior Member
 
Posts: 5
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

Export Account information to csv
CSV files and scripting...
[SOLVED] how to export account details ?
[SOLVED] Looking for reporting output of names, accounts, lists, alias, etc.

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
Reply With Quote
  #4 (permalink)  
Old 06-29-2009, 03:19 PM
Elite Member
 
Posts: 282
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:
Quote:
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 RAID 0+1 | Red Hat 5.3 | Zimbra 6.0.1 Network Edition
Test | HP DL360 G3 | 2x Xeon 3.06ghz | 4gb RAM | 6x 18gb RAID 5 | CentOS 5.3 | Not in use now
Reply With Quote
Reply


Thread Tools
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

Zimbrablog.com