Import Users

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
MartinSmith
Posts: 1
Joined: Sat Sep 13, 2014 12:35 am

Import Users

Post by MartinSmith »

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:IMAILdomain_comUsersmsmith
The format needed by zmprov is this.
ca msmith@domain.com 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.
Thanks

Martin,

Gulftex Operating, Inc.
uxbod
Ambassador
Ambassador
Posts: 7811
Joined: Fri Sep 12, 2014 10:21 pm

Import Users

Post by uxbod »

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 :confused: This can be done using IMAPSync.
eganja
Posts: 1
Joined: Sat Sep 13, 2014 12:45 am

Import Users

Post by eganja »

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 eric@test.be userPassword '{crypt}1bc29b36f623ba82aaf6724fd3b16718'
zmprov ma eric@test.be userPassword '{md5}1bc29b36f623ba82aaf6724fd3b16718'
zmprov ma eric@test.be userPassword '{SSHA}1bc29b36f623ba82aaf6724fd3b16718'
zmprov ma eric@test.be userPassword '{crypt}{md5}1bc29b36f623ba82aaf6724fd3b16718'
i probably forget something stupid

help

thank you in advance

eric from belgium
User avatar
753joho
Advanced member
Advanced member
Posts: 75
Joined: Sat Sep 13, 2014 12:01 am
Location: Sweden
ZCS/ZD Version: Release 8.0.9.GA.6191.NETWORK EDT

Import Users

Post by 753joho »

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):
$1$TMpWrOd7$2eL/F8sHshybbWGOcZ5Yx.
Direw79
Posts: 1
Joined: Sat Sep 13, 2014 12:07 am

Import Users

Post by Direw79 »

A quick solution is to create the account with no password
zmprov ma john@test.com "" ...
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
13445raj
Outstanding Member
Outstanding Member
Posts: 743
Joined: Fri Sep 12, 2014 9:59 pm
Location: Canada
Contact:

Import Users

Post by 13445raj »

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 :)
Raj
odeleon
Outstanding Member
Outstanding Member
Posts: 209
Joined: Sat Sep 13, 2014 12:44 am

Import Users

Post by odeleon »

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 account@example.com 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 OpenLDAP...so even your {crypt} passwords from /etc/shadow should work. I don't know what happens if they are salted, probably won't work.
Post Reply