Author Topic: Resolved - Password plugins  (Read 48726 times)

Offline tmsam

  • Newbie
  • *
  • Posts: 1
windows + Hmail + roundcube... cannot change pass
« Reply #30 on: April 08, 2010, 04:34:35 AM »
Hi every body, I have install :
1. windows xp
2. wampserver 2.0
3. Hmail 5.3.2
4. Roucube mail 0.3.1

Now can send/Reicv with webmail, pop.. but cannot change password. I have try password

plugin but now success. I think infomation data of user in hmail\database

folder\hmailserver.sdf not in mysql (mysql.initial.sql) . Pls help me.

Offline LMSSML

  • Jr. Member
  • **
  • Posts: 49
plugin with erro
« Reply #31 on: May 23, 2010, 11:56:51 AM »
Hi there,

I'm using postfix*postfixadmin+roundcube(4) but I have got one problem I've tried what you have been posted for my case that I think its a general case as indented here.

But got one problem made log on level 4 of roundcube.

When I try to change the password I saw this .

"Parse error: syntax error, unexpected '*' in /var/www/rc3/plugins/password/drivers/sql.php  on line 51"

This appears after pressing button to save password it's almost imediatley.


Any help would be appreciated.

Offline LMSSML

  • Jr. Member
  • **
  • Posts: 49
Password plugins
« Reply #32 on: May 26, 2010, 04:16:57 PM »
No chance of help ?

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Password plugins
« Reply #33 on: May 27, 2010, 12:39:11 AM »
Did you configure the following section properly?


// SQL Driver options
// ------------------
// PEAR database DSN for performing the query. By default
// Roundcube DB settings are used.
$rcmail_config['password_db_dsn'] = '';

// 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.
//      %D is replaced with the dovecotpw-crypted version of the new password
//      %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)';


The query should be something like:

UPDATE mailbox SET password=%c  WHERE username=%u
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline LMSSML

  • Jr. Member
  • **
  • Posts: 49
Password plugins
« Reply #34 on: May 28, 2010, 08:32:44 AM »
Hi there,


I use like this:

$rcmail_config['password_query'] = "UPDATE mailbox SELECT password = %c WHERE username = %u";

And I got the following error:

Parse error: syntax error, unexpected '*' in /var/www/rc3/plugins/password/drivers/sql.php on line 51

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Password plugins
« Reply #35 on: May 28, 2010, 08:53:47 AM »
Try without spaces and SELECT is wrong in this context.

$rcmail_config['password_query'] = "UPDATE mailbox SET password=%c WHERE username=%u";
« Last Edit: May 30, 2010, 03:45:04 AM by rosali »
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline LMSSML

  • Jr. Member
  • **
  • Posts: 49
Password plugins
« Reply #36 on: May 28, 2010, 02:30:19 PM »
Hi,
Thanks
for the awnser


But it happends the same :

Parse error: syntax error, unexpected '*' in /var/www/rc3/plugins/password/drivers/sql.php  on line 51


in sql.php line 51

I found this :

*  $sql = str_replace('%c',  $db->quote(crypt($passwd, CRYPT_MD5 ? '$1$'.$salt.'$' : $salt)), $sql);

I removed the asterisk and I've got this:

DB Error in /var/www/rc3/program/include/rcube_mdb2.php (627): MDB2 Error: syntax error Query: _doQuery: [Error message: Could not execute statement] [Last executed query: UPDATE mailbox SET password='$1$50SZH$ec36cegLTG2MSqm7jZ3X11' WHERE username=''teste@example.com''] [Native code: 1064] [Native message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'teste@example.com,''' at line 1]


It worked some problems on '%u' removed and it worked


Thanks a lot.
« Last Edit: May 28, 2010, 02:36:41 PM by LMSSML »

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Password plugins
« Reply #37 on: May 30, 2010, 03:46:39 AM »
@tmsam ... meanwhile there is a driver for hmailserver. Check out recent svn trunk version.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline LMSSML

  • Jr. Member
  • **
  • Posts: 49
Portuguese language
« Reply #38 on: June 01, 2010, 12:25:10 PM »
HI there

Everything works fine with rc4 and it's marvelous when I try to change languages to portuguese I get a blank screen when trying to execute the plugin from the interface.

Is it any bug or something that I make wrong ?

In english works
In portuguese (blank screen)

Thanks in advanced.

Offline LMSSML

  • Jr. Member
  • **
  • Posts: 49
Password plugins
« Reply #39 on: June 02, 2010, 02:48:59 AM »
Anyone with same problem ?

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Password plugins
« Reply #40 on: June 02, 2010, 03:31:05 AM »
Works for me with portugues. Please post your pt_PT language file and check error logs.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline LMSSML

  • Jr. Member
  • **
  • Posts: 49
Is like this
« Reply #41 on: June 03, 2010, 05:04:52 AM »
This is labels.inc

And I added the following but if i remove the problem is the same:

Quote
$labels['changepasswd']  = 'Alterar password';
$labels['curpasswd']  = 'Password atual:';
$labels['newpasswd']  = 'Nova password:';
$labels['confpasswd']  = 'Confirmar password:';

And I had the same like labesl.inc and add this:

Quote
$messages['nopassword'] = 'Introduza a nova password.';
$messages['nocurpassword'] = 'Introduza a password actual.';
$messages['passwordincorrect'] = 'Password actual errada.';
$messages['passwordinconsistency'] = 'Password\'s nao combinam, tente novamente..';
$messages['crypterror'] = 'Nao foi possivel gravar a nova password. Funcao de criptografica inexistente.';
$messages['connecterror'] = 'Nao foi possivel gravar a nova password. Erro de ligacao';
$messages['internalerror'] = 'Nao foi possivel gravar a nova password.';


In logs there are no reported errors
« Last Edit: June 03, 2010, 05:11:45 AM by LMSSML »

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Password plugins
« Reply #42 on: June 03, 2010, 11:05:34 AM »
Why did you alter the program localization? The plugin has it's own localization in ./plugins/password/localization.

You should not have to alter anything!
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline LMSSML

  • Jr. Member
  • **
  • Posts: 49
Password plugins
« Reply #43 on: June 03, 2010, 11:37:12 AM »
Hi there,

I didn't alter any path of files I just add inside each file what I've quoted before

the path still the same

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Password plugins
« Reply #44 on: June 04, 2010, 12:02:19 AM »
I meant you need not to add plugin localization to the default localization.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)