Results 1 to 7 of 7

Thread: Import Users

  1. #1
    Join Date
    Jul 2009
    Rep Power

    Default Import Users

    Hi all,

    I am exploring Zimbra as a replacement for my companies iMail server.
    We currently have 20 domains with about 100 total users using iMail
    We would like to use something like Zimbra for many reasons.
    As part of my evaulation I am trying to plan a migration from iMail.

    I have two ideas how this might work. But I need some help with both of them.

    One way would be to export the users then use zmprov to create the accounts.
    Most are POP so this would work ok.

    I have successfully exported the user names and provisioned Zimbra accounts using zmprov.
    The exported file from iMail is formated like this.

    msmith:x:0:384:Martin Smith:\IMAIL\domain_com\Users\msmith

    The format needed by zmprov is this.

    ca password displayName "Martin Smith" cn Martin sn Smith gn Martin

    So if I use this method I will need some code to convert the iMail file to the zimbra file. Not sure if anyone out their has done this already, if so that would be great. If not I will have to write this and I will post it here in case someone else finds it useful.

    The second would be to somehow do an ldap export and import. This might be ideal considering both mail systems utilize LDAP.

    I have no idea if this is possible or how I would proceed.

    I also don't know if it would be possible to bring over the passwords.

    Gulftex Operating, Inc.

  2. #2
    Join Date
    Nov 2006
    Rep Power


    Welcome to the forums

    If you can export the passwords, even if MD5 encrypted, you can then use them on the zmprov command when you create the account. Why do you need to create a program to import the email This can be done using IMAPSync.

  3. #3
    Join Date
    Sep 2009
    Rep Power


    I need your experience with MD5

    I have already successed to import passwords from /etc/shadow in zimbra

    with the command
    zmprov ma $user@$domain userPassword '{crypt}$pass'
    but if I'm not wrong, md5 passwords in shadow are salted

    but now I have problems to import md5 passwords created by the winmail server program which seems to use another mode

    in this program the encrypted version of the string 'md5' is '1bc29b36f623ba82aaf6724fd3b16718'
    I can easily check with milworm or other pass cracking that it's a valid md5 string

    but none of these command lines allow me to enter 'md5' as password in the wemail panel

    zmprov ma userPassword '{crypt}1bc29b36f623ba82aaf6724fd3b16718'

    zmprov ma userPassword '{md5}1bc29b36f623ba82aaf6724fd3b16718'

    zmprov ma userPassword '{SSHA}1bc29b36f623ba82aaf6724fd3b16718'

    zmprov ma userPassword '{crypt}{md5}1bc29b36f623ba82aaf6724fd3b16718'

    i probably forget something stupid
    thank you in advance
    eric from belgium

  4. #4
    Join Date
    Jan 2009
    Stockholm, Sweden
    Rep Power


    Did you ever manage to solve this?

    I too have the need to import a pre-encrypted password into Zimbra, the shadow entry has a password like this (on another Linux machine):


  5. #5
    Join Date
    Feb 2009
    Rep Power


    A quick solution is to create the account with no password

    zmprov ma "" ...

    Then run an ldapmodify on the account after creation with the salted/encrypted password stored there.

    dn: uid=john,ou=people,dc=domain,dc=com
    userPassword:: e2NYeXB8fTu5OFRBdjX4empHV0E=

    This worked during my migration on 5.x with 5500 or so accounts and I will be testing shortly on 6 to see if I can get it working there as well...

    Ill be back to let everyone know If I can get zmprov working or if the ldapmodify method still seems to work best

  6. #6
    Join Date
    Oct 2005
    USA, Canada and India
    Rep Power


    using zmprov the userPassword '{ANYTHING}' dont work..i tried it with all options with mmorse once..
    ldapmodify is the only way to go..
    by the way..anyone have full command how to use ldapmodify to update the crypt password

    i2k2 Networks
    Dedicated & Shared Zimbra Hosting Provider

  7. #7
    Join Date
    Sep 2009
    Rep Power


    When using zmprov createAccount or zmprov setPassword Zimbra will encrypt whatever you give it.

    To get a pre-encrypted password into a Zimbra account you should use zmprov modifyAccount userPassword password and it will take that and put it into the ldap directory as-is. I did it once when moving from a "generic" OpenLDAP to Zimbra's, I haven't done extensive testing but I think it will allow any encryption method that's compatible with even your {crypt} passwords from /etc/shadow should work. I don't know what happens if they are salted, probably won't work.

Similar Threads

  1. Active Directory Script to import users to Zimbra
    By egrueda in forum Administrators
    Replies: 35
    Last Post: 08-29-2012, 10:54 AM
  2. how to bulk import users with zmprov?
    By leocertuche in forum Administrators
    Replies: 3
    Last Post: 06-29-2009, 02:19 PM
    By amit_saini54 in forum Migration
    Replies: 0
    Last Post: 12-06-2007, 06:45 AM
  4. Replies: 1
    Last Post: 06-18-2007, 10:32 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