Page 1 of 1
Cpanel Restore script
Posted: Wed Oct 07, 2020 12:23 pm
by jonijoni
Hallo, from the Cpanel Restore script I can see that it is generating new passwords for all email accounts, is there any way for keeping old password, because I have one account with 300 emails and it will be quite difficult to inform all users for new passwords
BR
Re: Cpanel Restore script
Posted: Wed Oct 07, 2020 12:45 pm
by myVesta
Unfortunately, not.
Vesta is using MD5 hash function for passwords hashes, and cPanel uses (I think) SHA-256 algorithm.
Both algorithms are one-way-only, so there is no way to get decrypted value (in order to crypt it again with MD5 algorithm).
You can only set old passwords manually, if you know them.
You can also make bash script to set passwords quickly:
Code: Select all
v-change-mail-account-password yourVestaUsername domain.com mail_username1 somepass
v-change-mail-account-password yourVestaUsername domain.com mail_username2 somepass
v-change-mail-account-password yourVestaUsername domain.com mail_username3 somepass
....
Re: Cpanel Restore script
Posted: Sun Sep 12, 2021 5:50 am
by katycomputer
I checked with the Dovecot support group, /home/account/conf/mail/domain.com/passwd can have a mixture of MD5 & SHA512-CRYPT, so it should be able to keep the existing passwords.
Reference:
https://dovecot.org/pipermail/dovecot/2 ... 23010.html
Re: Cpanel Restore script
Posted: Sun Sep 12, 2021 12:45 pm
by myVesta
wow!
did you checked is it working?
Re: Cpanel Restore script
Posted: Sun Sep 12, 2021 1:05 pm
by myVesta
Actually, our importer script will not copy mail passwords from cPanel, we must do it manually, for testing purposes.
But if it's working, we can modify importer script to do it automatically.
Re: Cpanel Restore script
Posted: Fri Sep 24, 2021 1:49 pm
by myVesta
It works !
I manually copy-pasted passwords from
cpanel_backup_extracted_folder/homedir/etc/mydomain.com/shadow
to
/home/myuser/conf/mail/mydomain.com/passwd
in format
Code: Select all
testacc:{SHA512-CRYPT}***copy-pasted-password***:myuser:mail::/home/myuser:0
I will see now to make copying passwords automatically.
Re: Cpanel Restore script
Posted: Mon Sep 27, 2021 9:44 pm
by myVesta
Done -
https://github.com/myvesta/vesta/commit ... 3727482d8c
In order to get this fix, run:
Code: Select all
rm /var/cache/apt/archives/vesta_0.9.*
apt update && apt install --reinstall vesta