roundcube 密码插件未更新

roundcube 密码插件未更新

我正在尝试为 roundcube 配置密码插件,但无法让它工作!

当我更改密码时,总是弹出一条消息“发生错误,无法保存新密码。”

我的主要配置文件是:

$config['db_dsnw'] = 'mysql://user:pass@localhost/database';

 $config['default_host'] = 'localhost';

$config['support_url'] = '';

$config['des_key'] = 'c8191544ce23dfd879c73629';

$config['product_name'] = 'Webmail';

$config['plugins'] = array('password');

我的密码配置文件是:

$config['password_driver'] = 'sql';

$config['password_confirm_current'] = true;

$config['password_minimum_length'] = 8;

$config['password_require_nonalpha'] = false;

$config['password_log'] = false;

$config['password_hosts'] = array('localhost');

$config['password_force_save'] = true;

$config['password_force_new_user'] = true;


// SQL Driver options
// ------------------

$config['password_db_dsn'] = 'mysql://user:pass@localhost/database';

$config['password_query'] = 'UPDATE virtual_users SET password=ENCRYPT(%p, CONCAT(\'$6$\', SUBSTRING(SHA(RAND()), -16))) WHERE id=%u LIMIT 1';

附加数据库信息:

要添加新用户,我使用以下命令:

INSERT INTO `mailserver`.`virtual_users`
  (`domain_id`, `password` , `email`)
VALUES
  ('5', ENCRYPT('newpassword', CONCAT('$6$', SUBSTRING(SHA(RAND()), -16))) , '[email protected]');

答案1

解决了我自己的问题,

编辑为:

$config['password_query'] = ' UPDATE virtual_users SET password = ENCRYPT(%p, CONCAT(\'$6$\', SUBSTRING(SHA(RAND()), -16))) WHERE email = %u'

谢谢阅读。

答案2

编辑 roundcube mainconfig.inc.php并将插件名称“密码”添加到插件数组()中,如下所示,以激活该插件:

$config['plugins'] = array('password');
$config['db_dsnw'] = 'mysql://username:password@localhost/roundcube'

更改 roundcubeplugins/password/config.inc.php 请参考在此发布

相关内容