大佬教程收集整理的这篇文章主要介绍了linux – 如何使用随机盐设置带有sql驱动程序和mysql加密的roundcube密码插件?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
updatE users SET crypt = ENCRYPT('apassword',CONCAT('$5$',MD5(RAND()))) WHERE id = 'user@domain.tld';
Roundcube 1.0-RC根据http://trac.roundcube.net/wiki/Howto_Install安装
// List of active plugins (in plugins/ directory) $config['plugins'] = array('password');
您还可以记下圆形立方体使用的DSN连接到’roundcube’MysqL数据库$config [‘db_dsnw’] =’MysqL:// user:pass @ localhost / roundcube’
cd into … / roundcube_www_root / plugins / password /并创建config.inc.PHP
# cp config.inc.PHP.dist config.inc.PHP # vi config.inc.PHP
<?PHP $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_login_exceptions'] = null; // If the server is accessed via fqdn,replace localhost by the fqdn: $config['password_hosts'] = array('localhost'); $config['password_force_save'] = true; // sql Driver options $config['password_db_dsn'] = 'MysqL://user:pass@localhost/maildb'; // sql update Query with encrypted password using random 8 character salt $config['password_query'] = 'updatE users SET crypt=ENCRYPT(%p,CONCAT(_utf8\'$5$\',RIGHT(MD5(RAND()),8),_utf8\'$\')) WHERE id=%u LIMIT 1'; ...
更新:在某些情况下,localhost似乎无法工作,需要由Terry报告的127.0.0.1替换
更新:我最近不得不将圆形主机主配置(config / config.inc.PHP)中的参数$config [‘default_host’]更改为fqdn而不是localhost.因此我不得不将插件配置(plugins / password / config.inc.PHP)中的参数$config [‘password_hosts’]更改为服务器fqdn.
有关详细信息,请参阅… / plugins / password / README和… / plugins / password / config.inc.PHP.dist.
假设您将使用相同的MysqL用户作为密码插件来更新密码,您必须将’maildb’中的’users’表的GRANT SELECT和updatE权限授予’roundcube’MysqL用户:
# MysqL -u root -p MysqL > GRANT SELECT,updatE ON maildb.users TO 'roundcube'@'localhost'; MysqL > FLUSH PRIVILEGES; MysqL > quit #
# tail -f ../../logs/error
以上是大佬教程为你收集整理的linux – 如何使用随机盐设置带有sql驱动程序和mysql加密的roundcube密码插件?全部内容,希望文章能够帮你解决linux – 如何使用随机盐设置带有sql驱动程序和mysql加密的roundcube密码插件?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。