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 Display Modes
  #1 (permalink)  
Old 10-21-2009, 07:14 AM
Starter Member
 
Posts: 2
Default How to save user pass.

Friends all right?

Sorry for bad English, but I'm Brazilian. =)

I need to backup the passwords used today in my zimbra server.

I need to import those passwords in any place, to import on a server with only postfix + mysql.

Already could get the users that are in MySQL but the passwords did not.

Please, where I think these passwords?
Reply With Quote
  #2 (permalink)  
Old 10-21-2009, 11:51 AM
Intermediate Member
 
Posts: 20
Default

You can get the encrypted password out of ldap by running:

ldapsearch -x -W -D "uid=zimbra,cn=admins,cn=zimbra" -b 'dc=domain,dc=com' -h zimbraldaphost.domain.com '(uid=username)' userPassword

You then have to enter the ldap zimbra/admin password. If you don't know the password you can get it by running:
zmlocalconfig -s ldap_root_password
Reply With Quote
  #3 (permalink)  
Old 10-24-2009, 11:26 PM
Member
 
Posts: 12
Default

How could I then use the encrypted password to create the user in another zimbra server?

zmprov ma user@domain.com userPassword '{SSHA}encryptedpassword'

is that correct?
Reply With Quote
  #4 (permalink)  
Old 10-26-2009, 06:42 AM
Intermediate Member
 
Posts: 20
Default

Not quite. You would have to run the command:
zmprov ma user@domain.com userPassword 'temppassword'
because zmprov is expecting an unencrypted password. After you create the account you would then have to replace the temporary password in ldap with the encrypted one from the old server with ldapmodify:
ldapmodify -x -W -D "uid=zimbra,cn=admins,cn=zimbra" -b 'dc=domain,dc=com' -h zimbraldaphost.domain.com '(uid=username)' -f file_with_modify_commands

With the filing looking something like:
dn: uid=username,ou=people,dc=doman,dc=com
changetype: modify
replace: userPassword
userPassword: {SSHA}encryptedpassword
Reply With Quote
  #5 (permalink)  
Old 10-26-2009, 12:02 PM
Member
 
Posts: 12
Default encrypted passwords

Do you know if there is a difference between {SSHA} and {crypt} in the 'zmprov ma' command? I was able to import some old Unix crypt passwords using zmprov ma without needing to use ldapmodify. This is Zimbra v6.0.1.

The command I used was:
zmprov ma "user@domain" userPassword "{crypt}EncryptedPassword"
I haven't tried using SSHA passwords yet so I didn't know if that would fail down the road (just in the provisioning stage, not yet in production).
TomL
Reply With Quote
  #6 (permalink)  
Old 10-27-2009, 06:52 AM
Elite Member
 
Posts: 369
Default

I think you can import using {SSHA}encryptedpassword as well
Reply With Quote
  #7 (permalink)  
Old 10-27-2009, 07:09 AM
Intermediate Member
 
Posts: 20
Default

Interesting, I had no idea zmprov supported created an account using the encrypted password. Good to know!
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




 

Search Engine Optimization by vBSEO 3.1.0