Skip to content

hgdeoro/zimbra7-to-zimbra8-password-migrator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Based on:

Note: the accounts need to be created on the target Zimbra 8 server.

On Zimbra 7 host:

Load Zimbra settings / environment variables

root@zimbra7~$ sudo -u zimbra -i
zimbra@zimbra7~$ source ~/bin/zmshutil
zimbra@zimbra7~$ zmsetvars

Dump account & password hashes:

zimbra@zimbra7~$ ldapsearch -o ldif-wrap=no -x -H $ldap_master_url \
    -D $zimbra_ldap_userdn -w $zimbra_ldap_password -LLL \
    '(&(objectClass=zimbraAccount)(ou:dn:=people))' \
    dn displayName zimbraMailStatus zimbraMailDeliveryAddress \
    mail userPassword > /dev/shm/dump-zimbra-7.ldif

Generate the LDIF file:

zimbra@zimbra7~$ python generate_ldap_diff.py /dev/shm/dump-zimbra-7.ldif > /dev/shm/dump-zimbra-8.ldif 

Review errors (reported as comments at the end of the file):

zimbra@zimbra7~$ tail /dev/shm/dump-zimbra-8.ldif

Copy the LDIF file to the Zimbra 8 server:

zimbra@zimbra7~$ scp /dev/shm/dump-zimbra-8.ldif user@zimbra8:/dev/shm

On Zimbra 8 host, execute:

Load Zimbra settings / environment variables

root@zimbra8~$ sudo -u zimbra -i
zimbra@zimbra8~$ source ~/bin/zmshutil
zimbra@zimbra8~$ zmsetvars

Update the passwords:

zimbra@zimbra8~$ ldapmodify -v -x \
    -H $ldap_master_url \
    -D $zimbra_ldap_userdn \
    -w $zimbra_ldap_password -c -f /dev/shm/dump-zimbra-8.ldif

Since we are using '-c', ldapmodify will continue in case of errors...

Cleanup

After execution, remember to delete the ldif files on both servers!

About

Migrate Zimbra 7 passwords to Zimbra 8

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages