Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: b1cata on November 12, 2015, 03:01:01 PM

Title: Change password plugin error - DB Error: [1305]
Post by: b1cata on November 12, 2015, 03:01:01 PM
Hello,

I have roundcubemail-1.0.6-1.el6.noarch installed and I am trying to use password change plugin. I defined a config.inc.php, doing some minor changes, and than tried to use password plugin. The error which I found in errors file is:
DB Error: [1305] FUNCTION roundcubemail.update_passwd does not exist (SQL Query: SELECT update_passwd('$1$KbsAGdEr$xtUReOo9sRpDvdpyfXPxz1', 'user@domain.tld')) in /usr/share/roundcubemail/program/lib/Roundcube/rcube_db.php on line 467 (POST /?_task=settings&_action=plugin.password-save?_task=&_action=)

Google answers did not helped me too much.
Do you have any clue?

Thank you for your time.

Regards,
Catalin
Title: Re: Change password plugin error - DB Error: [1305]
Post by: SKaero on November 13, 2015, 03:26:14 AM
You need to configure the password plugin for your environment.
Title: Re: Change password plugin error - DB Error: [1305]
Post by: b1cata on November 13, 2015, 03:59:38 AM
Yes, I already understood that. In config.inc.php from password plugin directory I have:

$config['password_driver'] = 'sql';
$config['password_db_dsn'] = 'mysql://roundcube:mypassword@localhost/roundcubemail';

But I have tried either with
  $config['password_db_dsn'] = '';
to force using Roundcube DB settings.

Do I need more settings to make it work?

Thank you.
Title: Re: Change password plugin error - DB Error: [1305]
Post by: SKaero on November 13, 2015, 07:46:52 PM
Password are managed my the mail server not Roundcube.
Title: Re: Change password plugin error - DB Error: [1305]
Post by: b1cata on November 14, 2015, 06:01:59 AM
What do you mean, that I sould have in config.inc.php something like this?
  $config['password_db_dsn'] = 'mysql://postfix:mypassword@localhost/postfix';
I tried this, but I have the same error in roudcube logs. I think the first problem is that rouncube does not find roundcubemail.update_passwd function in order to run sql query.

Thank you,
Catalin.
Title: Re: Change password plugin error - DB Error: [1305]
Post by: JohnDoh on November 15, 2015, 03:36:33 AM
Quote
I think the first problem is that rouncube does not find roundcubemail.update_passwd function in order to run sql query.

`'SELECT update_passwd(%c, %u)';` is only an example of what the password query could be. Roundcube does not store or manage any passwords, the correct value of password_query will depend entirely on your setup. You have to configure password_db_dsn to connect to the database that holds your IMAP user information and then password_query to the SQL which is used to update the password in that database.
Title: Re: Change password plugin error - DB Error: [1305]
Post by: b1cata on November 15, 2015, 02:42:11 PM
You enlightened me. I have misunderstood the problem.

The correct configuration for postfix+mysql:
  $config['password_driver'] = 'sql';
  $config['password_db_dsn'] = 'mysql://postfix:mypassword@localhost/postfix';
  $config['password_query'] = 'UPDATE mailbox SET password=%c WHERE username=%u';

Thank you for your help.

Regards,
Catalin.