Author Topic: Password Plugin  (Read 8397 times)

Offline sasi

  • Jr. Member
  • **
  • Posts: 17
Password Plugin
« on: July 28, 2010, 11:59:34 PM »
HI Team,

      While searching for the password plugin guys you  gave me one link the link is carrying me to the hmail password plugin so that can utilized that for my Roundcube Webmail.

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Password Plugin
« Reply #1 on: July 29, 2010, 12:45:37 AM »
The default password plugin is shipped with Roundcube 0.4beta or SVN trunk (Roundcube Webmail).
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline sasi

  • Jr. Member
  • **
  • Posts: 17
Password Plugin
« Reply #2 on: July 29, 2010, 01:04:22 AM »
Quote from: rosali;29015
The default password plugin is shipped with Roundcube 0.4beta or SVN trunk (Roundcube Webmail).


Hi Rosali,

    Actually I had fully configured in Stable 0.3.1 Version so it might be a big work for me so please guide can i use the hmail password plugin
These are the links what i got from our  Team,

Plugin_Repository ? Roundcube Webmail

Doc_Plugins ? Roundcube Webmail

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Password Plugin
« Reply #3 on: July 29, 2010, 01:12:11 AM »
Hmmm, I do not get your problem ...

You can use the hmail_password plugin if you have hMailserver as backend. Otherwise you have to use the default password plugin.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline sasi

  • Jr. Member
  • **
  • Posts: 17
password plugin
« Reply #4 on: July 29, 2010, 01:52:36 AM »
Quote from: rosali;29018
Hmmm, I do not get your problem ...

You can use the hmail_password plugin if you have hMailserver as backend. Otherwise you have to use the default password plugin.


HI Rosali,

            Iam using Roundcube  Cube with Mysql has the database with dovecot and postfix,
So can u please guide how to finish my work with the default plugin.

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Password Plugin
« Reply #5 on: July 29, 2010, 06:01:10 AM »
Dovecot/Postfix users please jump in ...
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline sasi

  • Jr. Member
  • **
  • Posts: 17
Password Plugin
« Reply #6 on: July 29, 2010, 06:42:12 AM »
Quote from: rosali;29038
Dovecot/Postfix users please jump in ...


Hi Rosali,

  I cant understand.

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Password Plugin
« Reply #7 on: July 29, 2010, 11:53:22 AM »
I'm not familiar with Dovecot/Postfix. I hope you get assistance by other guys.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline kmn

  • Jr. Member
  • **
  • Posts: 44
Password Plugin
« Reply #8 on: July 30, 2010, 12:26:12 AM »
Hello,

The plugin that Rosali mentioned works only with Hmailserver. In your case, perhaps the new plugin shipped alongwith the new RC version will work. Rosali could you comment please?.

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Password Plugin
« Reply #9 on: July 30, 2010, 12:17:42 PM »
Yes, kmn. Could you assist to setup the default password plugin for Dovecot/Postfix?
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline sasi

  • Jr. Member
  • **
  • Posts: 17
password plugin
« Reply #10 on: July 31, 2010, 07:02:51 AM »
Quote from: rosali;29080
Yes, kmn. Could you assist to setup the default password plugin for Dovecot/Postfix?


HI KNM& Rosali,

   In the version 0.3.1 the roundcube having the password plugin content,In my case  i have enabled the password in the array in main.inc.php  and i want to conect the password plugin with the MYSQL DB to save the details,

                       Now iam getting connection error and iam attaching the screen shot
  has i came threw some document they mentioned to work with password_db_dsn and password_query  so please help to finish up this problem


// PEAR database DSN for performing the query. By default
// Roundcube DB settings are used.
$rcmail_config['password_db_dsn'] ='mysql://roundcube:forever@localhost';

// The SQL query used to change the password.
// The query can contain the following macros that will be expanded as follows:
//      %p is replaced with the plaintext new password
//      %c is replaced with the crypt version of the new password, MD5 if available
//         otherwise DES.
//      %o is replaced with the password before the change
//      %n is replaced with the hashed version of the new password
//      %q is replaced with the hashed password before the change
//      %h is replaced with the imap host (from the session info)
//      %u is replaced with the username (from the session info)
//      %l is replaced with the local part of the username
//         (in case the username is an email address)
//      %d is replaced with the domain part of the username
//         (in case the username is an email address)
// Escaping of macros is handled by this module.
// Default: "SELECT update_passwd(%c, %u)"
$rcmail_config['password_query'] = 'SELECT update_passwd(%c, %u)';

Offline Schmatze

  • Jr. Member
  • **
  • Posts: 31
Password Plugin
« Reply #11 on: August 18, 2010, 10:05:31 AM »
I'm tryng to get this plugin running. But I allways get this error-message:

Quote
DB Error: MDB2 Error: syntax error Query: _doQuery: [Error message: Could not execute statement] [Last executed query: see_next_code_block] [Native code: 1064] [Native message: You have an error in your SQL syntax; check the m in /path/to/roundcube/program/include/rcube_mdb2.php on line 644 (POST /?_task=settings&_action=plugin.password-save?_task=&_action=)


Here is my query (which works fine in phpmyadmin):
Quote
$rcmail_config['password_query'] = 'CREATE TEMPORARY TABLE userID (SELECT `id` FROM `virtual_users` WHERE `domain_id` =(SELECT `id` FROM `virtual_domains` WHERE `name` = %d) AND `user` = %l AND `password` = MD5( %o )); UPDATE `mail`.`virtual_users` SET `password` = MD5( %p ) WHERE `virtual_users`.`id` =(SELECT `id` FROM userID) LIMIT 1 ;';


I don't understand this error-message. I hope you does. Thanks.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Password Plugin
« Reply #12 on: August 18, 2010, 10:10:08 AM »
At the end of your query you have:
Code: [Select]
;';the first ; shouldn't be there, it should be:
Code: [Select]
$rcmail_config['password_query'] = 'CREATE TEMPORARY TABLE userID (SELECT `id` FROM `virtual_users` WHERE `domain_id` =(SELECT `id` FROM `virtual_domains` WHERE `name` = %d) AND `user` = %l AND `password` = MD5( %o )); UPDATE `mail`.`virtual_users` SET `password` = MD5( %p ) WHERE `virtual_users`.`id` =(SELECT `id` FROM userID) LIMIT 1';
EDIT: Oops I just read your query a little bit closer and noticed that you trying to run 2 query, RoundCube only supports running 1 query.
« Last Edit: August 18, 2010, 10:13:37 AM by skaero »

Offline Schmatze

  • Jr. Member
  • **
  • Posts: 31
Password Plugin
« Reply #13 on: August 18, 2010, 11:24:13 AM »
Quote from: skaero;29478
Oops I just read your query a little bit closer and noticed that you trying to run 2 query, RoundCube only supports running 1 query.


Do you have any suggestion how I can change this?

The problem is, that I need the id of the user, so I have to select the same table I want to update. And MySQL doesn't like this in one query.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Password Plugin
« Reply #14 on: August 18, 2010, 11:34:49 AM »
Can you do:
Code: [Select]
$rcmail_config['password_query'] = 'UPDATE `mail`.`virtual_users` SET `password` = MD5( %p ) WHERE `virtual_users`.`id` = (SELECT `id` FROM `virtual_users` WHERE `domain_id` = (SELECT `id` FROM `virtual_domains` WHERE `name` = %d) AND `user` = %l AND `password` = MD5( %o )) LIMIT 1';
Or does that also return a error (and if so what error)