-1

Im trying to configure password plugin for roundcube and cant get it to work!

When i change a password it always pops up a message " An error ocurred, Could not save new password."

My main config file is:

$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');

My password config file is:

$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';

Adititional database info:

To add a new user i use the following command:

INSERT INTO `mailserver`.`virtual_users`
  (`domain_id`, `password` , `email`)
VALUES
  ('5', ENCRYPT('newpassword', CONCAT('$6$', SUBSTRING(SHA(RAND()), -16))) , 'newemail@domain.com');
0

Solved myself,

edited to:

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

Thanks for reading.

0

Edit roundcube main config.inc.php and add the plugin name 'password' to the plugins array() as shown below, to activate the plugin:

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

change roundcube plugins/password/config.inc.php Please refer post here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.