Results 1 to 7 of 7

Thread: [SOLVED] How to force zmprov to create accounts on a specific server

  1. #1
    cchargin is offline New Member
    Join Date
    Jun 2007
    Posts
    4
    Rep Power
    7

    Default [SOLVED] How to force zmprov to create accounts on a specific server

    Hello all,

    I have a 2 server setup. I want to use zmprov to add a bunch of accounts, but zmprov appears to randomly distribute them among the 2 servers.

    Is there a way to force zmprov to make the accounts on just 1 of the servers?

  2. #2
    mmorse's Avatar
    mmorse is offline Moderator
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    20

    Default

    Welcome to the forums,
    does doing a -s {host}[:{port}] server hostname and optional port first help? or use zimbraMailHost?
    The attribute gets set to the server name of the host the admin browser connected to. This forces the administrator to connect to the admin console on the right server for
    provisioning users.
    zmprov ca account@domain.com password zimbraMailHost hostname

    OR
    Or you could clone your COS twice, and assign each cos's server pool one of your 2 servers -then add them via zmprov with cos name attached. "zmprov ca name@domain.com password zimbraCOS cosIDnumberstring" or use zmprov sac

    OR
    do a zmmailboxmove when your done
    "zmmailboxmove -a <email@address> -ow -s <servername> -t <movetoservername>"
    Last edited by mmorse; 03-20-2008 at 11:46 PM.

  3. #3
    kirme3 is offline Trained Alumni
    Join Date
    Apr 2006
    Location
    Illinois
    Posts
    194
    Rep Power
    9

    Default

    I've never used it in production, but testing with this multiple times has worked for me.

    zmprov ca account@domain.com password zimbraMailHost hostname etc....

  4. #4
    cchargin is offline New Member
    Join Date
    Jun 2007
    Posts
    4
    Rep Power
    7

    Default

    Hello,

    I tried the -s option and zmprov still distributes the accounts between the servers.

    Here is the zmprov command I first used (with real names and domains changed):
    zmprov ca email@domain.com password givenName 'First' sn 'Last' cn 'email' displayName 'First Last'

    Here is with the -s option:
    zmprov -s one.domain.com ca email@domain.com password givenName 'First' sn 'Last' cn 'email' displayName 'First Last'

    I have 2 servers. Server 1 is running Mailbox, MTA, and is the LDAP master. Server 2 is also running Mailbox, MTA, and is an LDAP replica. It does not matter which server I run zmprov from, they both do the same thing.

    I don't want to mess with COS duplication. I am still getting used to Zimbra and I don't want to do something that I might have to undo later.

    I used zmmailboxmove to clean up after my first test, but it is a pain. I have to check each mail account and make a list of where they ended up, then I have to run the zmmailboxmove command twice for each account, once to move it, then once to purge it from the previous server after I am sure it moved. However, if there is no solution, then this is how I will have to do it. It will be less painful than creating all the accounts by hand.

  5. #5
    kirme3 is offline Trained Alumni
    Join Date
    Apr 2006
    Location
    Illinois
    Posts
    194
    Rep Power
    9

    Default

    Have you tried:

    zmprov ca account@domain.com password zimbraMailHost hostname etc....

    ?

  6. #6
    cchargin is offline New Member
    Join Date
    Jun 2007
    Posts
    4
    Rep Power
    7

    Default

    Hello,

    Have you tried:

    zmprov ca account@domain.com password zimbraMailHost hostname etc....
    Oops, I missed the "zimbraMailHost" in your post! Yes, I tested this (after your second post made me read it closer) and it did work!

    Also, while looking for something else in the COS I found this:
    In the "Server Pool" tab you can set a server or servers where new accounts will be created. I unchecked one of my servers and saved the change, then all new accounts were created on only the server I wanted.

    Thanks for the help!

  7. #7
    mmorse's Avatar
    mmorse is offline Moderator
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    20

    Default

    Hence why I mentioned that you could make 2 duplicates of of your cos
    Three total: The current main one that contains both servers. Hit the duplicate button twice in the admin UI. For the duplicates assign them one server each; if you want to feed in to a specific server...assign them that cos when you create the accounts.

    Quote Originally Posted by cchargin
    I don't want to mess with COS duplication. I am still getting used to Zimbra...
    Duplicating is easy-just a 'duplicate' button in the main 'class of service' section. Later, you can always easily move all users to the main COS (that has both servers in the pool), and delete the 2 duplicate cos'es.

    Glad you found a method that works for you-it really comes down to what is most convenient at the time.
    Last edited by mmorse; 07-03-2007 at 06:53 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. initializing ldap...FAILED(256)ERROR
    By manjunath in forum Installation
    Replies: 39
    Last Post: 06-07-2013, 10:27 AM
  2. Zimbra fails after working for 2 weeks
    By Linsys in forum Administrators
    Replies: 10
    Last Post: 10-07-2008, 12:42 AM
  3. need advice on configuring zimbra to work with fax server
    By pheonix1t in forum Administrators
    Replies: 0
    Last Post: 07-11-2007, 07:46 PM
  4. Replies: 9
    Last Post: 04-14-2007, 08:31 AM
  5. Error 256 on Installation
    By RuinExplorer in forum Installation
    Replies: 5
    Last Post: 10-19-2006, 09:19 AM

Posting Permissions

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