Roundcube 不能修改密码的解决方法

hMailServer教程相关文章。

版主: Hsia

回复
头像
Hsia
网站管理员
网站管理员
帖子: 335
注册: 2014年11月26日, 12:41
地址: 上海
联系:

Roundcube 不能修改密码的解决方法

帖子 Hsia »

本文重点介绍Roundcube的插件不能修改密码的问题。
1.启用修改密码的插件:
修改roundcube的主配文件 config/config.inc.php,启用passwrod插件
$rcmail_config['plugins'] = array("password");
2.解决插件不工作,修改密码失败的方法:
修改password插件本身的配置文件,复制config.inc.php.dist为config.inc.php,然后做如下修改:
$config['password_driver'] = 'hmail';
修改 hMail Driver options相关项。
这段应该是这样的,你不用复制,只需要修改888888,这是你登陆hmailserver 的密码。

代码: 全选

// 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'] = false;
// Windows credentials
$config['hmailserver_server'] = array(
    'Server' => 'localhost', // hostname or ip address
    'Username' => 'administrator', // windows username
    'Password' => '888888' // windows user password
);
最后启用PHP的php_com_dotnet.dll扩展。
lqh280
Level 1
Level 1
帖子: 3
注册: 2016年3月10日, 11:05

Re: Roundcube 不能修改密码的解决方法

帖子 lqh280 »

如果 mysql 端口不是默认的3306,那么要不是在localhost后面添加“:端口”?
jumio
Level 2
Level 2
帖子: 6
注册: 2015年6月2日, 15:17

Re: Roundcube 不能修改密码的解决方法

帖子 jumio »

还有一个方法就是不改hmail,用默认的sql方式。

修改数据库连接串

进入“plugins\password”目录,复制一份config.inc.php.dist文件,修改为config.inc.php,搜索“$config['password_db_dsn']”,修改为:

代码: 全选

$config['password_db_dsn'] = 'mysql://root:yourpassword@localhost/hmailserver';
参数说明:

@mysql:因为roundcube我用的mysql作为数据存储

@root:访问数据库的用户(需要具有可读写权限)

@youpassword:密码,即你访问数据库的用户密码;

@localhost:本地访问

@hmailserver:安装hmialserver时的数据库名称;

功能:即链接hmailserver数据库

修改更新密码的SQL语句

搜索“$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';
这样也可以修改密码。
Royjohn
Level 2
Level 2
帖子: 9
注册: 2016年3月18日, 12:53

Re: Roundcube 不能修改密码的解决方法

帖子 Royjohn »

jumio 写了:还有一个方法就是不改hmail,用默认的sql方式。

修改数据库连接串

进入“plugins\password”目录,复制一份config.inc.php.dist文件,修改为config.inc.php,搜索“$config['password_db_dsn']”,修改为:

代码: 全选

$config['password_db_dsn'] = 'mysql://root:yourpassword@localhost/hmailserver';
参数说明:

@mysql:因为roundcube我用的mysql作为数据存储

@root:访问数据库的用户(需要具有可读写权限)

@youpassword:密码,即你访问数据库的用户密码;

@localhost:本地访问

@hmailserver:安装hmialserver时的数据库名称;

功能:即链接hmailserver数据库

修改更新密码的SQL语句

搜索“$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';
这样也可以修改密码。
哥们,按照你的方法到更改密码界面更改了点保存,我用的是Round 右下角提示保存成功,但是注销一登录,还是原来的密码,新密码没法登录
Royjohn
Level 2
Level 2
帖子: 9
注册: 2016年3月18日, 12:53

Re: Roundcube 不能修改密码的解决方法

帖子 Royjohn »

这楼主你的方法我刚才试了,发现不行,点保存之后页面一片空白 ,密码也没更改成功
头像
Hsia
网站管理员
网站管理员
帖子: 335
注册: 2014年11月26日, 12:41
地址: 上海
联系:

Re: Roundcube 不能修改密码的解决方法

帖子 Hsia »

以上两种方法都可行。如果没有成功,一定是遗留什么地方了。 jumio 是在数据库中修改,可行,亲测。
回复