Hello,
I installed the password plugin.
I also configured everything, but when I try to change my password, give me this error:
PHP Error: Password plugin: Hash method not supported. in /var/www/html/roundcube/plugins/password/password.php on line 787 (POST /?_task=settings&_action=plugin.password-save)
Do you have any idea?
I wold like to inform that the mail server and the webmail server are different, but in the same network. The driver used in plugin is sql.
Thanks
Can you post how you have the password plugin configured?
You need php-hash extension installed. Or use different password hashing method in configuration.
Hello,
thanks about your support.
Followinf you can find my config plugin:
$config['password_driver'] = 'sql';
.
$config['password_strength_driver'] = null;
$config['password_confirm_current'] = true;
$config['password_minimum_length'] = 8;
$config['password_minimum_score'] = 0;
$config['password_log'] = false;
$config['password_login_exceptions'] = null;
$config['password_hosts'] = null;
$config['password_force_save'] = false;
$config['password_force_new_user'] = false;
$config['password_algorithm'] = 'clear';
$config['password_algorithm_options'] = [];
$config['password_algorithm_prefix'] = '';
$config['password_dovecotpw'] = '/usr/local/sbin/dovecotpw'; // for dovecot-1.x
$config['password_dovecotpw_with_method'] = false;
$config['password_disabled'] = false;
$config['password_username_format'] = '%u';
$config['password_http_client'] = [];
$config['password_db_dsn'] = 'mysql://user:[email protected]/dbname';
$config['password_query'] = 'UPDATE mailbox SET password = password_hash(md5(%p)) WHERE username = %u LIMIT 1';
$config['password_idn_ascii'] = false;
The PHP version installed is PHP Version 8.1.2-1ubuntu2.8
Attached is the value of hash module in my php
Thanks alec and SKaero :)
What file are those config options placed in? Also note that your password_query will not work since you are trying to use PHP functions in the SQL statement.
Hi SKaero,
those config are in the file /var/www/html/roundcube/plugins/password/config.inc.php.dist
You means that in the password_query, I can set only like this? It will work?
$config['password_query'] = 'UPDATE mailbox SET password = %p WHERE username = %u LIMIT 1';
Also this is not working with same error
Thanks
The <RC root>/plugins/password/config.inc.php.dist file should not be updated. As the first point in the README file in the password folder notes:
QuoteCopy config.inc.php.dist to config.inc.php and set the options as described within the file.
As for the query I don't see why that query wouldn't work.
Hi SKaero
thank you so much.
This is my big mistake. :(
Now is working!!! ;D
Also the query script is correct like following
$config['password_query'] = 'UPDATE mailbox SET password=%P WHERE username=%u LIMIT 1';
I'm so sorry about that
been very helpful :)