Roundcube Community Forum

Release Support => Pending Issues => Topic started by: rebeldu31 on September 02, 2018, 04:22:51 PM

Title: [RESOLVED] Plugin Password don't work
Post by: rebeldu31 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.
Title: Re: Plugin Password don't work
Post by: SKaero 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:

// 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'] = '';
Title: Re: Plugin Password don't work
Post by: rebeldu31 on September 03, 2018, 02:01:17 PM
Quote from: SKaero 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:

// 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 !!!
::)
Title: Re: Plugin Password don't work
Post by: SKaero on September 03, 2018, 02:56:03 PM
What file did you place that config string in?
Title: Re: Plugin Password don't work
Post by: rebeldu31 on September 03, 2018, 03:33:18 PM
In config.inc.php file, on plugin repertory.
Title: Re: Plugin Password don't work
Post by: SKaero 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:
$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.
Title: Re: Plugin Password don't work
Post by: rebeldu31 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 !!!