环境

windows 8

apache:httpd-2.4.25-x64-vc14-r1

mysql:5.6

php:php-7.1.5-Win32-VC14-x64

hmailserver:hMailServer-5.6.7-B2407

roundcube:roundcubemail-1.2.5-complete

搭建成功,可以正常使用,收发邮件,但就是在修改密码时发生错误,提示“无法保存新密码”。而我又发现,但新密码与旧密码相同时,则提示修改密码成功。无论怎样修改配置文件中的SQL语句,只要新旧密码一样,都会提示修改成功,貌似UPDATE语句根本没有发生作用。目前纠结困惑中,网上查的方法都试过了,均无结果,求大神指点,不胜感激。

以下密码插件配置config.inc.php:

<?php// Password Plugin options
// -----------------------
// A driver to use for password change. Default: "sql".
// See README file for list of supported driver names.
$config['password_driver'] = 'sql';// Determine whether current password is required to change password.
// Default: false.
$config['password_confirm_current'] = true;// Require the new password to be a certain length.
// set to blank to allow passwords of any length
$config['password_minimum_length'] = 0;// Require the new password to contain a letter and punctuation character
// Change to false to remove this check.
$config['password_require_nonalpha'] = false;// Enables logging of password changes into logs/password
$config['password_log'] = false;// Comma-separated list of login exceptions for which password change
// will be not available (no Password tab in Settings)
$config['password_login_exceptions'] = null;// Array of hosts that support password changing. Default is NULL.
// Listed hosts will feature a Password option in Settings; others will not.
// Example: array('mail.example.com', 'mail2.example.org');
$config['password_hosts'] = null;// Enables saving the new password even if it matches the old password. Useful
// for upgrading the stored passwords after the encryption scheme has changed.
$config['password_force_save'] = false;// Enables forcing new users to change their password at their first login.
$config['password_force_new_user'] = false;// Default password hashing/crypting algorithm.
// Possible options: des-crypt, ext-des-crypt, md5-crypt, blowfish-crypt,
// sha256-crypt, sha512-crypt, md5, sha, smd5, ssha, samba, ad, dovecot, clear.
// For details see password::hash_password() method.
$config['password_algorithm'] = 'clear';// Password prefix (e.g. {CRYPT}, {SHA}) for passwords generated
// using password_algorithm above. Default: empty.
$config['password_algorithm_prefix'] = '';// Path for dovecotpw/doveadm-pw (if not in the $PATH).
// Used for password_algorithm = 'dovecot'.
// $config['password_dovecotpw'] = '/usr/local/sbin/doveadm pw'; // for dovecot-2.x
$config['password_dovecotpw'] = '/usr/local/sbin/dovecotpw'; // for dovecot-1.x// Dovecot password scheme.
// Used for password_algorithm = 'dovecot'.
$config['password_dovecotpw_method'] = 'CRAM-MD5';// Iteration count parameter for Blowfish-based hashing algo.
// It must be between 4 and 31. Default: 12.
// Be aware, the higher the value, the longer it takes to generate the password hashes.
$config['password_blowfish_cost'] = 12;// Number of rounds for the sha256 and sha512 crypt hashing algorithms.
// Must be at least 1000. If not set, then the number of rounds is left up
// to the crypt() implementation. On glibc this defaults to 5000.
// Be aware, the higher the value, the longer it takes to generate the password hashes.
//$config['password_crypt_rounds'] = 50000;// This option temporarily disables the password change functionality.
// Use it when the users database server is in maintenance mode or sth like that.
// You can set it to TRUE/FALSE or a text describing the reason
// which will replace the default.
$config['password_disabled'] = false;// SQL Driver options
// ------------------
// PEAR database DSN for performing the query. By default
// Roundcube DB settings are used.
$config['password_db_dsn'] = 'mysql://root:********@localhost/mail_server';
//$config['password_db_dsn'] = ''
// The SQL query used to change the password.
// The query can contain the following macros that will be expanded as follows:
//      %p is replaced with the plaintext new password
//      %P is replaced with the crypted/hashed new password
//         according to configured password_method
//      %o is replaced with the old (current) password
//      %O is replaced with the crypted/hashed old (current) password
//         according to configured password_method
//      %h is replaced with the imap host (from the session info)
//      %u is replaced with the username (from the session info)
//      %l is replaced with the local part of the username
//         (in case the username is an email address)
//      %d is replaced with the domain part of the username
//         (in case the username is an email address)
// Deprecated macros:
//      %c is replaced with the crypt version of the new password, MD5 if available
//         otherwise DES. More hash function can be enabled using the password_crypt_hash
//         configuration parameter.
//      %D is replaced with the dovecotpw-crypted version of the new password
//      %n is replaced with the hashed version of the new password
//      %q is replaced with the hashed password before the change
// Escaping of macros is handled by this module.
// Default: "SELECT update_passwd(%c, %u)"
//$config['password_query'] = 'SELECT update_passwd(%c, %u)';//$config['password_query'] = 'SELECT update_passwd(%c, %u)';
$config['password_query'] = 'UPDATE hm_accounts SET accountpassword=md5(%p),accountpwencryption = 2 WHERE accountaddress=%u LIMIT 1';// By default the crypt() function which is used to create the %c
// parameter uses the md5 algorithm (deprecated, use %P).
// You can choose between: des, md5, blowfish, sha256, sha512.
$config['password_crypt_hash'] = 'md5';// By default domains in variables are using unicode.
// Enable this option to use punycoded names
$config['password_idn_ascii'] = false;// Enables use of password with crypt method prefix in %D, e.g. {MD5}$1$LUiMYWqx$fEkg/ggr/L6Mb2X7be4i1/
// when using the %D macro (deprecated, use %P)
$config['password_dovecotpw_with_method'] = false;// Using a password hash for %n and %q variables (deprecated, use %P).
// Determine which hashing algorithm should be used to generate
// the hashed new and current password for using them within the
// SQL query. Requires PHP's 'hash' extension.
$config['password_hash_algorithm'] = 'sha1';// You can also decide whether the hash should be provided
// as hex string or in base64 encoded format.
$config['password_hash_base64'] = false;// Poppassd Driver options
// -----------------------
// The host which changes the password
$config['password_pop_host'] = 'localhost';// TCP port used for poppassd connections
$config['password_pop_port'] = 106;// SASL Driver options
// -------------------
// Additional arguments for the saslpasswd2 call
$config['password_saslpasswd_args'] = '';// LDAP and LDAP_SIMPLE Driver options
// -----------------------------------
// LDAP server name to connect to.
// You can provide one or several hosts in an array in which case the hosts are tried from left to right.
// Exemple: array('ldap1.exemple.com', 'ldap2.exemple.com');
// Default: 'localhost'
$config['password_ldap_host'] = 'localhost';// LDAP server port to connect to
// Default: '389'
$config['password_ldap_port'] = '389';// TLS is started after connecting
// Using TLS for password modification is recommanded.
// Default: false
$config['password_ldap_starttls'] = false;// LDAP version
// Default: '3'
$config['password_ldap_version'] = '3';// LDAP base name (root directory)
// Exemple: 'dc=exemple,dc=com'
$config['password_ldap_basedn'] = 'dc=exemple,dc=com';// LDAP connection method
// There is two connection method for changing a user's LDAP password.
// 'user': use user credential (recommanded, require password_confirm_current=true)
// 'admin': use admin credential (this mode require password_ldap_adminDN and password_ldap_adminPW)
// Default: 'user'
$config['password_ldap_method'] = 'user';// LDAP Admin DN
// Used only in admin connection mode
// Default: null
$config['password_ldap_adminDN'] = null;// LDAP Admin Password
// Used only in admin connection mode
// Default: null
$config['password_ldap_adminPW'] = null;// LDAP user DN mask
// The user's DN is mandatory and as we only have his login,
// we need to re-create his DN using a mask
// '%login' will be replaced by the current roundcube user's login
// '%name' will be replaced by the current roundcube user's name part
// '%domain' will be replaced by the current roundcube user's domain part
// '%dc' will be replaced by domain name hierarchal string e.g. "dc=test,dc=domain,dc=com"
// Exemple: 'uid=%login,ou=people,dc=exemple,dc=com'
$config['password_ldap_userDN_mask'] = 'uid=%login,ou=people,dc=exemple,dc=com';// LDAP search DN
// The DN roundcube should bind with to find out user's DN
// based on his login. Note that you should comment out the default
// password_ldap_userDN_mask setting for this to take effect.
// Use this if you cannot specify a general template for user DN with
// password_ldap_userDN_mask. You need to perform a search based on
// users login to find his DN instead. A common reason might be that
// your users are placed under different ou's like engineering or
// sales which cannot be derived from their login only.
$config['password_ldap_searchDN'] = 'cn=roundcube,ou=services,dc=example,dc=com';// LDAP search password
// If password_ldap_searchDN is set, the password to use for
// binding to search for user's DN. Note that you should comment out the default
// password_ldap_userDN_mask setting for this to take effect.
// Warning: Be sure to set approperiate permissions on this file so this password
// is only accesible to roundcube and don't forget to restrict roundcube's access to
// your directory as much as possible using ACLs. Should this password be compromised
// you want to minimize the damage.
$config['password_ldap_searchPW'] = 'secret';// LDAP search base
// If password_ldap_searchDN is set, the base to search in using the filter below.
// Note that you should comment out the default password_ldap_userDN_mask setting
// for this to take effect.
$config['password_ldap_search_base'] = 'ou=people,dc=example,dc=com';// LDAP search filter
// If password_ldap_searchDN is set, the filter to use when
// searching for user's DN. Note that you should comment out the default
// password_ldap_userDN_mask setting for this to take effect.
// '%login' will be replaced by the current roundcube user's login
// '%name' will be replaced by the current roundcube user's name part
// '%domain' will be replaced by the current roundcube user's domain part
// '%dc' will be replaced by domain name hierarchal string e.g. "dc=test,dc=domain,dc=com"
// Example: '(uid=%login)'
// Example: '(&(objectClass=posixAccount)(uid=%login))'
$config['password_ldap_search_filter'] = '(uid=%login)';// LDAP password hash type
// Standard LDAP encryption type which must be one of: crypt,
// ext_des, md5crypt, blowfish, md5, sha, smd5, ssha, ad, cram-md5 (dovecot style) or clear.
// Set to 'default' if you want to use method specified in password_algorithm option above.
// Multiple password Values can be generated by concatenating encodings with a +. E.g. 'cram-md5+crypt'
// Default: 'crypt'.
$config['password_ldap_encodage'] = 'crypt';// LDAP password attribute
// Name of the ldap's attribute used for storing user password
// Default: 'userPassword'
$config['password_ldap_pwattr'] = 'userPassword';// LDAP password force replace
// Force LDAP replace in cases where ACL allows only replace not read
// See http://pear.php.net/package/Net_LDAP2/docs/latest/Net_LDAP2/Net_LDAP2_Entry.html#methodreplace
// Default: true
$config['password_ldap_force_replace'] = true;// LDAP Password Last Change Date
// Some places use an attribute to store the date of the last password change
// The date is meassured in "days since epoch" (an integer value)
// Whenever the password is changed, the attribute will be updated if set (e.g. shadowLastChange)
$config['password_ldap_lchattr'] = '';// LDAP Samba password attribute, e.g. sambaNTPassword
// Name of the LDAP's Samba attribute used for storing user password
$config['password_ldap_samba_pwattr'] = '';// LDAP Samba Password Last Change Date attribute, e.g. sambaPwdLastSet
// Some places use an attribute to store the date of the last password change
// The date is meassured in "seconds since epoch" (an integer value)
// Whenever the password is changed, the attribute will be updated if set
$config['password_ldap_samba_lchattr'] = '';// DirectAdmin Driver options
// --------------------------
// The host which changes the password
// Use 'ssl://host' instead of 'tcp://host' when running DirectAdmin over SSL.
// The host can contain the following macros that will be expanded as follows:
//     %h is replaced with the imap host (from the session info)
//     %d is replaced with the domain part of the username (if the username is an email)
$config['password_directadmin_host'] = 'tcp://localhost';// TCP port used for DirectAdmin connections
$config['password_directadmin_port'] = 2222;// vpopmaild Driver options
// -----------------------
// The host which changes the password
$config['password_vpopmaild_host'] = 'localhost';// TCP port used for vpopmaild connections
$config['password_vpopmaild_port'] = 89;// Timout used for the connection to vpopmaild (in seconds)
$config['password_vpopmaild_timeout'] = 10;// cPanel Driver options
// --------------------------
// The cPanel Host name
$config['password_cpanel_host'] = 'host.domain.com';// The cPanel admin username
$config['password_cpanel_username'] = 'username';// The cPanel admin password
$config['password_cpanel_password'] = 'password';// The cPanel port to use
$config['password_cpanel_port'] = 2087;// XIMSS (Communigate server) Driver options
// -----------------------------------------
// Host name of the Communigate server
$config['password_ximss_host'] = 'mail.example.com';// XIMSS port on Communigate server
$config['password_ximss_port'] = 11024;// chpasswd Driver options
// ---------------------
// Command to use (see "Sudo setup" in README)
$config['password_chpasswd_cmd'] = 'sudo /usr/sbin/chpasswd 2> /dev/null';// XMail Driver options
// ---------------------
$config['xmail_host'] = 'localhost';
$config['xmail_user'] = 'YourXmailControlUser';
$config['xmail_pass'] = 'YourXmailControlPass';
$config['xmail_port'] = 6017;// hMail Driver options
// -----------------------
// Remote hMailServer configuration
// true:  HMailserver is on a remote box (php.ini: com.allow_dcom = true)
// false: Hmailserver is on same box as PHP
$config['hmailserver_remote_dcom'] = true;
// Windows credentials
$config['hmailserver_server'] = array('Server'   => 'localhost',      // hostname or ip address'Username' => 'administrator',  // windows username'Password' => '12345678'        // windows user password
);// Virtualmin Driver options
// -------------------------
// Username format:
// 0: username@domain
// 1: username%domain
// 2: username.domain
// 3: domain.username
// 4: username-domain
// 5: domain-username
// 6: username_domain
// 7: domain_username
$config['password_virtualmin_format'] = 0;// pw_usermod Driver options
// --------------------------
// Use comma delimited exlist to disable password change for users.
// See "Sudo setup" in README file.
$config['password_pw_usermod_cmd'] = 'sudo /usr/sbin/pw usermod -h 0 -n';// DBMail Driver options
// -------------------
// Additional arguments for the dbmail-users call
$config['password_dbmail_args'] = '-p sha512';// Expect Driver options
// ---------------------
// Location of expect binary
$config['password_expect_bin'] = '/usr/bin/expect';// Location of expect script (see helpers/passwd-expect)
$config['password_expect_script'] = '';// Arguments for the expect script. See the helpers/passwd-expect file for details.
// This is probably a good starting default:
//   -telent -host localhost -output /tmp/passwd.log -log /tmp/passwd.log
$config['password_expect_params'] = '';// smb Driver options
// ---------------------
// Samba host (default: localhost)
// Supported replacement variables:
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
$config['password_smb_host'] = 'localhost';
// Location of smbpasswd binary
$config['password_smb_cmd'] = '/usr/bin/smbpasswd';// gearman driver options
// ---------------------
// Gearman host (default: localhost)
$config['password_gearman_host'] = 'localhost';// Plesk/PPA Driver options
// --------------------
// You need to allow RCP for IP of roundcube-server in Plesk/PPA Panel // Plesk RCP Host
$config['password_plesk_host'] = '10.0.0.5';// Plesk RPC Username
$config['password_plesk_user'] = 'admin';// Plesk RPC Password
$config['password_plesk_pass'] = 'password';// Plesk RPC Port
$config['password_plesk_rpc_port'] = '8443';// Plesk RPC Path
$config['password_plesk_rpc_path'] = 'enterprise/control/agent.php';// kasswd Driver options
// ---------------------
// Command to use
$config['password_kpasswd_cmd'] = '/usr/bin/kpasswd';

转载于:https://www.cnblogs.com/rainbow-top/p/7082992.html

求助:hmailserver+roundcube启用密码插件后,用户无法修改密码问题相关推荐

  1. oracle禁止修改密码,Oracle 用户密码过期后不允许修改密码的示例代码

    --本人是初学者,不知道还有没有更好的方法create table PASSWD_CHANGED ( USER_NAME VARCHAR2(20), OLD_PASSWD VARCHAR2(100), ...

  2. RHEL 5 密码破解和防止别人通过单用户模式修改密码

    一. 如何破解root账户的密码 1.在grub引导界面中按"e"进入grub的编辑模式. 2.编辑模式下选择第二项,即:"kernel/vmlinuz-2.6.18-8 ...

  3. Samba平台搭建和用户自行修改密码环境搭建笔记

    Samba 平台搭建和用户自行修改密码环境搭建笔记 系统:CentOS  release  6.5 (Final)x86_64 软件: samba                   #服务端 sam ...

  4. python配置文件密码管理_用户配置文件和密码配置文件,用户组管理和用户管理...

    1 用户配置文件 /etc/passwd 是用户配置文件,每创建一个用户,该配置文件相应增加一行. [root@localhost ~]# cat /etc/passwd root:x:0:0:roo ...

  5. 【05】Oracle创建用户、修改密码

    文章目录 1.创建用户 1.1 cmd命令创建用户 1.2 Navicat工具创建用户 1.3 删除用户 2.修改密码 1.创建用户 1.1 cmd命令创建用户 以system身份 登录Oracle数 ...

  6. Linux单用户模式修改密码

    一.单用户模式简介 忘记root密码这个问题出现的几率是很高的,不过,在linux下解决这个问题也很简单,只需重启linux系统,然后引导进入linux的单用户模式(init1),由于单用户模式是不需 ...

  7. 美多商城之用户中心(修改密码)

    修改密码 1. 修改密码后端逻辑 提示: 修改密码前需要校验原始密码是否正确,以校验修改密码的用户身份. 如果原始密码正确,再将新的密码赋值给用户. class ChangePasswordView( ...

  8. 达梦数据库初始化、创建用户和修改密码

    达梦数据库初始化.创建用户和修改密码 进入数据库目录 cd /opt/dmdbms/bin/bin 初始化数据文件路径.簇大小和页大小 ./dminit path=/mnt/data EXTENT_S ...

  9. linux禁止普通用户修改密码,禁止普通用户Sudo修改root密码

    问题模拟,普通用户可以sudo修改密码. vi /etc/sudoers #在root权限编辑sudoers文件,在结尾添加内容liuqingfeng 为普通用户 liuqingfeng ALL=/u ...

  10. MySQL8 创建用户,设置修改密码,授权

    MySQL8 创建用户,设置修改密码,授权 MySQL5.7可以 (创建用户,设置密码,授权) 一步到位

最新文章

  1. 【转】expect语言学习笔记
  2. linux c open fopen freopen 文件操作函数
  3. chkdsk 检查卷位图时发现损坏_活塞连杆组的分解与组装、活塞环的检查
  4. java怎么xml文件解析_Java对Xml文件解析
  5. 设计模式(6)-装饰器(认识程序中的装饰器)
  6. boost::mp11::mp_with_index相关用法的测试程序
  7. 同步和原子性---多线程学习笔记(四)
  8. 国内外知名光端机品牌大全
  9. hive split 注意事项
  10. 51单片机跑马灯c语言,51单片机——跑马灯详解(示例代码)
  11. android dagger2 讲解,用Dagger2在Android中实现依赖注入
  12. 数据结构——查找与排序
  13. 三月写给沉默王二的一封道歉信
  14. Linux命令速查---kalrry
  15. 深入理解光电二极管恒流特性与电压电流检测电路原理
  16. 自动化测试-数据驱动
  17. java毕设项目公立医院绩效考核系统(附源码)
  18. 薅资本主义羊毛,用Google免费GPU
  19. oracle19数据库对内存要求,在天堂 - 技术老男
  20. 四旋翼无人机学习第2节--cadence工程创建与原理图的添加

热门文章

  1. 2022全网最全的持续集成基础【你知道的和不知道都在这里】
  2. win10安装docker导致virtualbox无法启动问题解决
  3. CSS / 三大特性+盒子模型+PS基础
  4. VMware vCenter Server 7.0安装配置
  5. html登陆成功自动跳转,点击登录,登陆成功,自动跳转到起始页面,这要怎么做?...
  6. ug界面改为经典ug界面怎么设置ug界面设置
  7. 国内外可用的知识图谱资源
  8. 【机器智能】双十一奇迹背后:机器智能如何构建社会的全新技术设施?
  9. 大疆图像算法面试流程
  10. Python爬虫入门教程 41-100 Fiddler+夜神模拟器+雷电模拟器配置手机APP爬虫部分