For that I need usual output from logs (as from ispcp) *-rqst-mngr
migration from ispcp
- Kika
- Closed
- Thread is marked as Resolved.
-
-
I didn't found the domain in the /etc/postfix/imscp/domains, but now i have admin panel and pma and i saw the domain's settings, and i found unlimited mail accounts.
-
-
yeah, problems with decrypting mail passwords. you must reset password in table (use clean not encrypted pass) set status and run again setup
-
in the /etc/postfix/imscp/mailboxes i found some mailbox with this domain.tld[hr]
can i decrypt the real password for this users? (i have problem with 48 mailboxes) -
-
in the /etc/postfix/imscp/mailboxes i found some mailbox with this domain.tld[hr]
can i decrypt the real password for this users?if you have saved table for mail users yes:
[code=php]<?php$key = 'putkeyhere';
$iv = 'putivhere';
$pass = 'putpasshere';echo decrypt_db_password($pass);
function decrypt_db_password($password)
{
if ($password == '') { return ''; }if (extension_loaded('mcrypt')) {
$text = @base64_decode($password . "\n");
$td = @mcrypt_module_open('blowfish', '', 'cbc', '');// Initialize encryption
@mcrypt_generic_init($td, $key, $iv);
// Decrypt encrypted string
$decrypted = @mdecrypt_generic($td, $text);
@mcrypt_module_close($td);// Show string
return trim($decrypted);
} else {
throw new Exception("PHP extension 'mcrypt' not loaded!");
}
}[/php] -
this script is echo nothing. I inserted the $key and $iv from the ispcp's db key file, and i pasted from the db a mail password. I inserted an quote at the before and at the and of the decripted passwod and i see only "".
-
-
Sorry:
[code=php]$key = 'putkey';
$iv = 'putiv';
$pass = 'putpass';var_dump(decrypt_db_password($pass, $key, $iv));
function decrypt_db_password($password, $key, $iv){
if ($password == '') { return ''; }if (extension_loaded('mcrypt')) {
$text = base64_decode($password . "\n");
$td = mcrypt_module_open('blowfish', '', 'cbc', '');// Initialize encryption
mcrypt_generic_init($td, $key, $iv);
// Decrypt encrypted string
$decrypted = @mdecrypt_generic($td, $text);
mcrypt_module_close($td);// Show string
return trim($decrypted);
} else {
throw new Exception("PHP extension 'mcrypt' not loaded!");
}
}
[/php] -
I saw the new passwords and i think that i found lot of "wrong" passwords with status ok. Sometimes i just see only 1-3 characters in this field[hr]
thanks, this is works perfectly. -
-
This bug we discovered managed to ruin all mail and sql password. Do you have a backup of ispcp keys and table for mail and sql? if yes you can recover them. otherwise change them to random password and inform costumer to change those passwords. After you finish with passwords (before informing clients if necessary) run again setup to finish rebuild of all client configs.
-
i have only one question
I loaded the old database, and your script can decrypt the passwords, but how can i encrypt with the new format before insert into the updated imscp database? or i must use password as plain text in the new database?
-