Author Topic: Change password plugin error - DB Error: [1305]  (Read 6704 times)

Offline b1cata

  • Newbie
  • *
  • Posts: 4
Change password plugin error - DB Error: [1305]
« 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

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: Change password plugin error - DB Error: [1305]
« Reply #1 on: November 13, 2015, 03:26:14 AM »
You need to configure the password plugin for your environment.

Offline b1cata

  • Newbie
  • *
  • Posts: 4
Re: Change password plugin error - DB Error: [1305]
« Reply #2 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.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: Change password plugin error - DB Error: [1305]
« Reply #3 on: November 13, 2015, 07:46:52 PM »
Password are managed my the mail server not Roundcube.

Offline b1cata

  • Newbie
  • *
  • Posts: 4
Re: Change password plugin error - DB Error: [1305]
« Reply #4 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.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,856
Re: Change password plugin error - DB Error: [1305]
« Reply #5 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.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline b1cata

  • Newbie
  • *
  • Posts: 4
Re: Change password plugin error - DB Error: [1305]
« Reply #6 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.