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
Cpanel Restore script
- myVesta
- Site Admin
- Posts: 932
- Joined: Fri Jun 19, 2020 9:59 am
- Has thanked: 8 times
- Been thanked: 6 times
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:
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
....
-
- Posts: 1
- Joined: Wed Sep 08, 2021 12:55 am
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
Reference: https://dovecot.org/pipermail/dovecot/2 ... 23010.html
- myVesta
- Site Admin
- Posts: 932
- Joined: Fri Jun 19, 2020 9:59 am
- Has thanked: 8 times
- Been thanked: 6 times
wow!katycomputer wrote: ↑Sun Sep 12, 2021 5:50 am 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
did you checked is it working?
- myVesta
- Site Admin
- Posts: 932
- Joined: Fri Jun 19, 2020 9:59 am
- Has thanked: 8 times
- Been thanked: 6 times
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
I will see now to make copying passwords automatically.
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
- myVesta
- Site Admin
- Posts: 932
- Joined: Fri Jun 19, 2020 9:59 am
- Has thanked: 8 times
- Been thanked: 6 times
Done - https://github.com/myvesta/vesta/commit ... 3727482d8c
In order to get this fix, run:
In order to get this fix, run:
Code: Select all
rm /var/cache/apt/archives/vesta_0.9.*
apt update && apt install --reinstall vesta