Roundcube Community Forum

Third Party Contributions => API Based Plugins => Topic started by: kknddandy on January 24, 2010, 12:59:36 PM

Title: Any 0.3.1 Mysql password changer?
Post by: kknddandy on January 24, 2010, 12:59:36 PM
Hi all,

I am newbie here, just tried to install roundcube on my server, I used postfix + mysql to create virual domain and users.

Is there any plugin available for the 0.3.1 version?

thx
Title: Any 0.3.1 Mysql password changer?
Post by: JohnDoh on January 24, 2010, 01:59:27 PM
There is a password plugin which ships with 0.3.1, it supports changing passwords in sql.
Title: Any 0.3.1 Mysql password changer?
Post by: kknddandy on January 28, 2010, 12:14:35 AM
Hi, the password plugin is cool, and it could change the password, but the problem is the password stored in my database was encrypted in md5crypt format, and the password seem encrypt the password in DES, I guess, the encrypted password are shorter than original one.
    So, once the user changed their password in roundcube, roundcube could not send any mail any more, cuz the password is in different format I guess.

    Is there any way to make the plugin encrypt password into md5crypt format? Thanks!!!
Title: Any 0.3.1 Mysql password changer?
Post by: SKaero on January 28, 2010, 01:17:17 AM
I think they are encoded with md5 but there salted, just modify the sql driver to get it to mach your database.
Title: Any 0.3.1 Mysql password changer?
Post by: kknddandy on January 28, 2010, 02:16:27 AM
Thanks.



i tried to modify config.php.inc , to be like this
$rcmail_config['password_query'] = "UPDATE mailbox SET password = %c, modified=now() WHERE username = %u LIMIT 1;";
the password in database is now in format "$1$", but just something wrong,


I checked the drivers/sql.php, but it is really too hard for me, I don't know which line should be modified.

I used posfixadmin to create mailbox also the encrypted password, will you give me a little help on this?
Title: Any 0.3.1 Mysql password changer?
Post by: SKaero on January 28, 2010, 02:34:50 AM
Quote from: kknddandy;24967Thanks.



i tried to modify config.php.inc , to be like this
$rcmail_config['password_query'] = "UPDATE mailbox SET password = %c, modified=now() WHERE username = %u LIMIT 1;";
the password in database is now in format "$1$", but just something wrong,


I checked the drivers/sql.php, but it is really too hard for me, I don't know which line should be modified.

I used posfixadmin to create mailbox also the encrypted password, will you give me a little help on this?
If you just need to be encoded with MD5 do:
$rcmail_config['password_query'] = "UPDATE mailbox SET password = md5(%p), modified=now() WHERE username = %u LIMIT 1;";
Title: Any 0.3.1 Mysql password changer?
Post by: kknddandy on January 28, 2010, 03:17:25 AM
Hi , Thanks for replying me so quick.

er.... the password created by postfix admin was encrypted in MD5CRYPT format
but the dovecot can read it, also can smtp it, the setting in dovecot is MD5-CRYPT

So the password must be encrypted in MD5crypt format not MD5 check sum.
Title: Any 0.3.1 Mysql password changer?
Post by: SKaero on January 28, 2010, 03:42:29 AM
Ah, I don't know as much about MD5-CRYPT, I don't see what wrong with the $rcmail_config['password_query'] = "UPDATE mailbox SET password = %c, modified=now() WHERE username = %u LIMIT 1;"; Do you have a custom salt?
Title: Any 0.3.1 Mysql password changer?
Post by: Martian on February 02, 2010, 09:16:47 AM
You can change the password encryption format in both postfixadmin and dovecot.  Most SASL formats are supported by both programs.  I think MD5-Crypt is a Dovecot specific thing but I could be wrong.  The key will be finding one that Postfixadmin, Dovecot, and Roundcube can all understand.

I would recommend trying CRAM-MD5.  I know for a fact both Postfixadmin and Dovecot can handle that.  Perhaps Skaero will know how to use CRAM-MD5 in Roundcube.

Martian
Title: Any 0.3.1 Mysql password changer?
Post by: sasi on August 02, 2010, 02:11:41 AM
Quote from: kknddandy;24964Hi, the password plugin is cool, and it could change the password, but the problem is the password stored in my database was encrypted in md5crypt format, and the password seem encrypt the password in DES, I guess, the encrypted password are shorter than original one.
    So, once the user changed their password in roundcube, roundcube could not send any mail any more, cuz the password is in different format I guess.

    Is there any way to make the plugin encrypt password into md5crypt format? Thanks!!!

HI KKnddandy,
     
              can you please explain how to enable the password plugin in roundcube 0.3.1
Title: Any 0.3.1 Mysql password changer?
Post by: waqarhassan41 on August 06, 2010, 03:14:13 AM
Very nice post thanks dear friends thanks agian
Webmaster Forum  Free software (http://www.yougeo.com)
Title: Any 0.3.1 Mysql password changer?
Post by: d3v4 on March 17, 2011, 01:05:45 AM
Quote from: kknddandy;24967Thanks.



i tried to modify config.php.inc , to be like this
$rcmail_config['password_query'] = "UPDATE mailbox SET password = %c, modified=now() WHERE username = %u LIMIT 1;";
the password in database is now in format "$1$", but just something wrong,


I checked the drivers/sql.php, but it is really too hard for me, I don't know which line should be modified.

I used posfixadmin to create mailbox also the encrypted password, will you give me a little help on this?

i'm using a little difference from your code

$rcmail_config['password_query'] = 'UPDATE mailbox SET password = %c, modified=now() WHERE username = %u LIMIT 1';


worked like a charm, thank you..............