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

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 Search this Thread Display Modes
  #1 (permalink)  
Old 04-05-2011, 07:36 AM
Starter Member
 
Posts: 1
Default Import MD5 Hashes into Zimbra LDAP Directory

Hello everyone:

I'm trying to migrate my old postfix users' passwords hashed in MD5 to Zimbra CS 7.0. I'm able to view the postfix's passwords with this simple sql query:

Quote:
mysql> select Username, Password from postfix.mailbox;
+-----------------------------+----------------------------------+
|⠀Username⠀⠀⠀⠀⠀⠀|⠀Password⠀⠀⠀⠀⠀⠀⠀⠀⠀|
+-----------------------------+----------------------------------+
|⠀mailadmin@mydomain.com⠀⠀⠀| db77e4a763ec5b10bd818a39XXXXc7bd⠀|
|⠀user1@mydomain.com⠀⠀⠀⠀⠀⠀| 6473275beXXXXd628855e20736b9aeb6⠀|
etc...
I read this:
Password Migration - Zimbra :: Wiki
And I executed a simple "modify account" on a user:
Quote:
zmprov ma mailadmin@mydomain.com userPassword '{crypt}db77e4a763ec5b10bd818a39XXXXc7bd'
But it didn't work, after read some related threads i executed:
Quote:
zmprov ma mailadmin@mydomain.com userPassword '{MD5}db77e4a763ec5b10bd818a39XXXXc7bd'
It failed again. So I had to go deeper into, using ldapsearch and ldapmodify:
Quote:
/opt/zimbra/openldap/bin/ldapsearch -H ldap://mail.mydomain.com l -D uid=zimbra,cn=admins,cn=zimbra -x -w <my-pass> | grep -A 10 mailadmin
It gave me:
Quote:
...
userPassword:: ADfdsafaSGFASQ== (a base 64 value with {SSHA})
I changed it with:
Quote:
/opt/zimbra/openldap/bin/ldapmodify -x -h mail.mydomain.com -D "uid=zimbra,cn=admins,cn=zimbra" -w <mypass>
dn: uid=mailadmin,ou=people,dc=mydomain,dc=com
changetype: modify
replace: userPassword
userPassword: {MD5}db77e4a763ec5b10bd818a39XXXXc7bd

modifying entry "uid=mailadmin,ou=people,dc=mydomain,dc=com"
Now, the userPassword says:
Quote:
userPassword:: e01ENX1kYjc3ZTRhNzYzZWM1YjEwYmQ4MThhMzlYWFhYYzdiZA ==
Please note that "::" means that the value is written in Base64. The above text says: {MD5}db77e4a763ec5b10bd818a39XXXXc7bd, that looks good
But the problem is not solved. I need to import all those MD5 hashes into the LDAP directory. I've read and tried some methods like putting "password-hash {MD5}" into slapd.conf and so, but it isn't working.

What can I do? Thanks in advance.

Best Regards.
codeN_

P.S: user accounts, the domain and the hashes had been modified because of privacy issues.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.