Thx for your hint.
I have changed in /etc/roundcubemail/password.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';
$config['password_driver'] = 'chpasswd';
but the roundcubemail still uses sql driver
drivers files are stored in /usr/share/roundcubemail/plugins/password/drivers
OK I have added $config['password_driver'] = 'chpasswd'; into the etc/roundcubemail/config.inc.php and I can put the new password in roundcubemail form but the password not updated in passwd file.
Next step I have made some changes in chpasswd.php
public function save($currpass, $newpass, $username)
{
// $cmd = rcmail::get_instance()->config->get('password_chpasswd_cmd');
$cmd = "echo '".$username.":".$newpass."' |". rcmail::get_instance()->config->get('password_chpasswd_cmd');
$handle = popen($cmd, "w");
//fwrite($handle, "$username:$newpass\n");
fwrite($handle, "");
if (pclose($handle) == 0) {
return PASSWORD_SUCCESS;
}
rcube::raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Password plugin: Unable to execute $cmd"
), true, false);
return PASSWORD_ERROR;
}
And there is a error log:
PHP Error: Password plugin: Unable to execute echo 'username:password' | in /usr/share/roundcubemail/plugins/password/drivers/chpasswd.php on line 48 (POST /roundcubemail/?_task=settings&_action=plugin.password-save)
Any idea?