password encryption

Discussion in 'Installation/Configuration' started by acumen, Jun 25, 2009.

  1. acumen

    acumen New Member

    I am now setting up the squirrelmail's change sql password plugin. but I stucked on the encryption type and the salt. And what's the password of user ispconfig in mysql?

    here below is my sql pass config,

    $csp_dsn = 'mysql://root:p[email protected]/dbispconfig';
    $lookup_password_query = 'SELECT count(*) FROM mail_user WHERE email = "%1" AND password = %4';
    $password_update_queries = array('UPDATE mail_user SET password = %4 WHERE email = "%1"',);
    $password_encryption = 'MD5CRYPT';
    $csp_salt_static = 'LEFT(password, 2)';

    I tried to use MD5 & MD5CRYPT, and salt as ' ' & 'LEFT(password, 2)' combination also not success.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The encryption is "crypt", this is the default on all Linux distributions:
    for ($n=0;$n<11;$n++) {
    $record[$key] = crypt($record[$key],$salt);
  3. acumen

    acumen New Member

    Sorry that I am not very familier with php, the sqmail's sql pass change only got choice of MYSQLPWD, MYSQLENCRYPT, PHPCRYPT, MD5CRYPT & MD5. And it will call a function with the same name. So, you mean I need to create a function call 'crypt' to let the password change?
    And, is "$1$" is the static salt that I can fill in the $csp_salt_static? or the code should be
    $csp_salt_static = 'LEFT(password, 3)';
    since "$1$" is from the first 3 of password?

    And, what's the password of user "ispconfig"? I may need to add into the sqlpass plugin config.
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The md5crypt method should be fine, but it depends on if their implementation is compatioble with the crypt mechanism from linux. If their encryption is not compatible, you might have to implement the encryption as it is done in the example above.

    The password is different for every setup of course. You find it in the ispconfig file.
  5. acumen

    acumen New Member

    Is there anyone got success for the squirrelmail's change_sql_pass work with ISPConfig 3? I really had no idea how to work it out!! :confused:
  6. acumen

    acumen New Member

    can anyone help??:confused:
  7. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Try changing
    $csp_salt_static 'LEFT(password, 2)';

    for (
    $n=0;$n<11;$n++) {
  8. acumen

    acumen New Member

    I still cannot make the sqmail change password~ the code provide by Croydon will cause the php change password show http500 error cannot display.

    Any one using squirrel mail and got the change password successful??:(
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Check the apache error log.

Share This Page