Author Topic: [RESOLVED] Plugin Password don't work  (Read 3542 times)

Offline rebeldu31

  • Jr. Member
  • **
  • Posts: 26
[RESOLVED] Plugin Password don't work
« on: September 02, 2018, 04:22:51 PM »
Hi all,

The plugin "Password" don't work on my Roundcube configuration.

When I try to modify my password I have this message on the errors file :
DB Error: SQLSTATE[28000] [1045] Access denied for user 'user'@'server' (using password: YES) in /NFS_Mounts/WWW/roundcube/program/lib/Roundcube/rcube_db.php on line 175 (POST /?_task=settings&_action=plugin.password-save)

The password must be modified on the database "postfixadmin" and not on "roundcubemail", and it in spite of the creation of a user with the good privileges on mariadb5.

Thank's for your help.
« Last Edit: September 04, 2018, 11:56:13 AM by rebeldu31 »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,878
    • SKaero - Custom Roundcube development
Re: Plugin Password don't work
« Reply #1 on: September 03, 2018, 12:53:20 AM »
The password plugin needs to be configured. It sounds like you need to set the database connection string in for the password plugin:
Code: [Select]
// SQL Driver options
// ------------------
// PEAR database DSN for performing the query. By default
// Roundcube DB settings are used.
// Supported replacement variables:
// %h - user's IMAP hostname
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %z - IMAP domain (IMAP hostname without the first part)
$config['password_db_dsn'] = '';

Offline rebeldu31

  • Jr. Member
  • **
  • Posts: 26
Re: Plugin Password don't work
« Reply #2 on: September 03, 2018, 02:01:17 PM »
The password plugin needs to be configured. It sounds like you need to set the database connection string in for the password plugin:
Code: [Select]
// SQL Driver options
// ------------------
// PEAR database DSN for performing the query. By default
// Roundcube DB settings are used.
// Supported replacement variables:
// %h - user's IMAP hostname
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %z - IMAP domain (IMAP hostname without the first part)
$config['password_db_dsn'] = '';

Yes, that's what I have doing.
I have that :
$config['password_db_dsn'] = "mysql://user_db:password_db;@SERVER_DB/postfixadmin";

But that don't work !!!
 ::)

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,878
    • SKaero - Custom Roundcube development
Re: Plugin Password don't work
« Reply #3 on: September 03, 2018, 02:56:03 PM »
What file did you place that config string in?

Offline rebeldu31

  • Jr. Member
  • **
  • Posts: 26
Re: Plugin Password don't work
« Reply #4 on: September 03, 2018, 03:33:18 PM »
In config.inc.php file, on plugin repertory.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,878
    • SKaero - Custom Roundcube development
Re: Plugin Password don't work
« Reply #5 on: September 04, 2018, 01:52:28 AM »
Then it seems like you have it setup correctly you may need to check on the mysql side why the login is failing (for example did you flush privileges after creating the user.)

The only other thing I noticed is in your config string you posted:
Code: [Select]
$config['password_db_dsn'] = "mysql://user_db:password_db;@SERVER_DB/postfixadmin";
I'm assuming it was a copy mistake but in this case the password would literally be "password_db;" if there isn't a ; at the end of the password it shouldn't be there.

Offline rebeldu31

  • Jr. Member
  • **
  • Posts: 26
Re: Plugin Password don't work
« Reply #6 on: September 04, 2018, 11:55:51 AM »
It's OK, that work !!!
 :D
It was a mistake on my password... The ";" was a mistake...
I corrected and that works !!!