Roundcube Community Forum

 

Change password with SHA512-CRYPT

Started by the_extremist, September 07, 2020, 05:18:21 AM

Previous topic - Next topic

the_extremist

Hello, I have a problem. Trying to generate new password with sha-512-crypt.
In plain mode everything works fine with %p parameter, when I try to use crypt method I get the error, the is no coding function. Tryied with %P.

This is config.inc.ph


$config['password_driver'] = 'sql';
$config['password_confirm_current'] = false;
$config['password_minimum_length'] = 8;
$config['password_require_nonalpha'] = false;
$config['password_log'] = true;
$config['password_login_exceptions'] = true;
// If the server is accessed via fqdn, replace localhost by the fqdn:
#$config['password_hosts'] = array('192.168.45.2');
$config['password_force_save'] = true;
$config['password_algorithm'] = 'clear';
$config['password_force_new_user'] = true;

// SQL Driver options
$config['password_db_dsn'] = 'mysql://xxxxxxxxx:[email protected]/xxxxxxxxxxxxx';

$config['password_dovecotpw'] = '/usr/bin/doveadm pw';
$config['password_crypt_rounds'] = 50000;
$config['password_crypt_hash'] = 'SHA512-CRYPT';
$config['password_dovecotpw_method'] = 'SHA512-CRYPT';
$config['password_dovecotpw_with_method'] = true;
$config['password_algorithm'] = 'dovecot';

// SQL Update Query with encrypted password using random 8 character salt
$config['password_query'] = "UPDATE mailbox SET password = %P WHERE username=%u";


doveadm working fine I think

[root@localhost password]# doveadm pw -p 'ASDwqe123' -s SHA512-CRYPT
{SHA512-CRYPT}$6$m6iskStIm8EusmYK$ogeTjtqmLTJ660p8g0eVnFWBQcmnzXwRGKNZjOJ2T4t3t8xzvpBZ5u/MtgdXI.Uf3Lj8fxaLxJ8aZebEYaVEo0


Please help me with this

alec

password_algorithm='sha512-crypt' // needs to be in lower-case

the_extremist