瀏覽代碼

Using SQL query to change Roundcube passwords

merge-requests/1/merge
Christoph Haas 10 年之前
父節點
當前提交
d81556979e
共有 1 個檔案被更改,包括 4 行新增4 行删除
  1. +4
    -4
      roles/ispmail-webmail/templates/roundcube-password-config.inc.php.j2

+ 4
- 4
roles/ispmail-webmail/templates/roundcube-password-config.inc.php.j2 查看文件

@@ -64,7 +64,7 @@ $config['password_db_dsn'] = 'mysql://mailuser:{{ispmail_mysql_mailuser_password
// Escaping of macros is handled by this module. // Escaping of macros is handled by this module.
// Default: "SELECT update_passwd(%c, %u)" // Default: "SELECT update_passwd(%c, %u)"
//$config['password_query'] = 'SELECT update_passwd(%D, %u)'; //$config['password_query'] = 'SELECT update_passwd(%D, %u)';
$config['password_query'] = 'UPDATE virtual_users set password=%D where email=%u';
$config['password_query'] = "UPDATE virtual_users SET password=CONCAT('{SHA256-CRYPT}', ENCRYPT (%p, CONCAT('$5$', SUBSTRING(SHA(RAND()), -16)))) WHERE email=%u;";


// By default the crypt() function which is used to create the '%c' // By default the crypt() function which is used to create the '%c'
// parameter uses the md5 algorithm. To use different algorithms // parameter uses the md5 algorithm. To use different algorithms
@@ -78,13 +78,13 @@ $config['password_query'] = 'UPDATE virtual_users set password=%D where email=%u
$config['password_idn_ascii'] = false; $config['password_idn_ascii'] = false;


// Path for dovecotpw (if not in $PATH) // Path for dovecotpw (if not in $PATH)
$config['password_dovecotpw'] = '/usr/sbin/dovecot pw';
//$config['password_dovecotpw'] = '/usr/sbin/dovecot pw';


// Dovecot method (dovecotpw -s 'method') // Dovecot method (dovecotpw -s 'method')
$config['password_dovecotpw_method'] = 'SHA256-CRYPT';
//$config['password_dovecotpw_method'] = 'SHA256-CRYPT';


// Enables use of password with crypt method prefix in %D, e.g. {MD5}$1$LUiMYWqx$fEkg/ggr/L6Mb2X7be4i1/ // Enables use of password with crypt method prefix in %D, e.g. {MD5}$1$LUiMYWqx$fEkg/ggr/L6Mb2X7be4i1/
$config['password_dovecotpw_with_method'] = true;
//$config['password_dovecotpw_with_method'] = true;


// Using a password hash for %n and %q variables. // Using a password hash for %n and %q variables.
// Determine which hashing algorithm should be used to generate // Determine which hashing algorithm should be used to generate


Loading…
取消
儲存