Getting old passwords from IspCP 1.0.6

  • I have a production server on IspCP 1.0.6
    Due to some modifications I made, I prefer not migrate to 1.0.7.
    And as the machine is pretty old, I decided to put a new server in place, with I-mscp 1.0.2.1 RC2
    I've created the needed users (don't need to move all the users), created the mail accounts, the ftp accounts, the databases setup, the databases themselves.
    I moved the data too.


    But for the database, it's easy to find passwords used on the old server (just looking in the config files of the user's scripts hosted like wp-config.php) I have a problem for the mail and the ftp accounts.


    On IspCP those passwords are md5 crypted and not on imscp.


    Is there a way to decrypt the passwords on ispcp to use them in imscp ?


    I found some pieces of code somewhere on german threads, but unable to use them (probably missing something..)

  • hello,


    I will advice to migrate to ISPCP 1.0.7 and migrate to 1.0.2.1 RC2


    if migrate to ISPCP 1.0.7 fail -> correct different problem before migrate to I-MSCP


    test into test server for migration ( will prevent correction on production server )


    sorry but i don't know how to bring MD5 password in clear password.

    Debian 6 with proxmox 2 - OpenVZ - KVM
    I-mscp 1.0.3.0 migrate from ispcp 1.0.7
    dovecot + zarafa + z-push + maia mail guard + apacheITK

  • Seeking help on the above... it looks like isp-control.net site is down for good, so I can't see how to decrypt.


    VirtualCed are you able to shed some light on this or TheCry? Just need to decrypt the passwords to make my migration out of ISPCP easier!

  • ?? Just migrate to imscp.. Before you can also try the migration on a test server..

  • Seeking help on the above... it looks like isp-control.net site is down for good, so I can't see how to decrypt.


    VirtualCed are you able to shed some light on this or TheCry? Just need to decrypt the passwords to make my migration out of ISPCP easier!

    Here is the original message :


    [Shell] Decrypt Mailpasswords - Knut - 01-21-2009 03:59 AM




    In some cases, I need the decrypted password of a user's mail.
    To make it easier for me, I have written a small php-shell-script.




    Here we go:
    (of course you need php-cli)




    1. Save this code over here -> /root/bin




    PHP Code:
    #!/usr/bin/php -q




    <?php




    ## Autor: Knut Herter
    ## Datum: 06.10.2009
    ## Web : http://www.systemtechnics.de
    ##
    ## Usage: decrypt_mailpw.php |grep whatever_you_want
    ##
    ## Example: decrypt_mailpw.php |grep admin







    ###
    # FIRST CHANGE THIS VALUES !
    ###




    $SQLHST = "localhost";
    $SQLUSR = "root";
    $ISPCPDB = "ispcp";




    # if error_reporting on, you see some session errors at cli
    error_reporting(0);




    #################################
    #### Do not change from here ####




    echo "MySQL password for $SQLUSR@$SQLHST: ";
    system('stty -echo');
    $SQLPW = trim(fgets(STDIN));
    system('stty echo');




    $QUERY = "
    SELECT `mail_users`.mail_acc,
    `mail_users`.mail_pass,
    `domain`.domain_name




    FROM `domain`




    INNER JOIN `mail_users` ON (`mail_users`.domain_id = `domain`.domain_id)




    WHERE `mail_type` LIKE 'normal_mail' OR `mail_type` LIKE 'normal_mail,normal_forward'";




    require '/var/www/ispcp/gui/include/ispcp-lib.php';




    $link = mysql_connect( $SQLHST, $SQLUSR, $SQLPW);
    if (!$link) {
    die('keine Verbindung möglich: ' . mysql_error());
    }




    mysql_select_db( $ISPCPDB, $link) or die('Could not select database.');




    $result = mysql_query($QUERY);
    if (!$result) {
    die('Ungültige Abfrage: ' . mysql_error());
    }




    $FORMAT = "Domain MailAdr: [ %s@%s ] Passwort: [ %s ]\n";
    while ($row = mysql_fetch_row($result)) {
    printf ( $FORMAT, $row[0], $row[2], decrypt_db_password ($row[1]));
    }
    printf ("\n");




    mysql_close($link);




    ####### DOMAINALIASE




    $QUERY = "
    SELECT `mail_users`.mail_acc,
    `mail_users`.mail_pass,
    `domain_aliasses`.alias_name




    FROM `domain_aliasses`




    INNER JOIN `mail_users` ON (`mail_users`.sub_id = `domain_aliasses`.alias_id)




    WHERE `mail_type` LIKE 'alias_mail' OR `mail_type` LIKE 'alias_mail,alias_forward'";










    $link = mysql_connect( $SQLHST, $SQLUSR, $SQLPW);
    if (!$link) {
    die('keine Verbindung möglich: ' . mysql_error());
    }




    mysql_select_db( $ISPCPDB, $link) or die('Could not select database.');




    $result = mysql_query($QUERY);
    if (!$result) {
    die('Ungültige Abfrage: ' . mysql_error());
    }







    $FORMAT = "Aliasdomain MailAdr: [ %s@%s ] Passwort: [ %s ]\n";
    while ($row = mysql_fetch_row($result)) {
    printf ( $FORMAT, $row[0], $row[2], decrypt_db_password ($row[1]));
    }
    printf ("\n");




    mysql_close($link);







    2. make it executable




    Code:
    chmod +x /root/bin/decrypt_mailpw.php




    3. run :-)




    4. If you want a special mailpassword, run with grep
    example:Code:
    decrypt_mailpw.php |grep webmaster
    orCode:
    decrypt_mailpw.php |grep mydomain.de
  • long ago that script ...but it still works :-)

    -- formerly known as knut --
    ensim -> confixx -> vhcs -> ispcp -> kloxo -> easyscp -> ispconfig 3 -> i-mscp -> ispconfig 3.1