ispCP - Board - Support
PWD Changer @RC7 and Rouncube 0.2 Stable - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Contributions Area (/forum-40.html)
+--- Forum: Howtos (/forum-41.html)
+--- Thread: PWD Changer @RC7 and Rouncube 0.2 Stable (/thread-5798.html)

Pages: 1 2 3


PWD Changer @RC7 and Rouncube 0.2 Stable - Top44 - 02-24-2009 12:58 AM

// EDIT
Please use the Wiki Version --> http://www.isp-control.net/documentation/howto/mail/install_roundcube_for_webmail


BeNe

An installation of Roundcube is required.

First login to yout mysql :
Quote:mysql -u root -p
And do this :
Quote:GRANT SELECT (`mail_addr`), UPDATE (`mail_pass`, `status`) ON `ispcp`.`mail_users` TO 'roundcube'@'localhost';
FLUSH PRIVILEGES;

Then open save_prefs.inc
Quote:/webmail/program/steps/settings/save_prefs.inc

// Zeile 2 nach <?php einfügen :
// Line 2 after <?php add:

Quote:define('INCLUDEPATH', '../../include/');
require(INCLUDEPATH . '/ispcp-config.php');
require(INCLUDEPATH . '/ispcp-db-keys.php');
require(INCLUDEPATH . '/ispcp-functions.php');

and

// Zeile 34 nach 'prefer_html' => isset($_POST['_prefer_html']) ? TRUE : FALSE, einfügen :
// Line 34 after 'prefer_html' => isset($_POST['_prefer_html']) ? TRUE : FALSE, add :

Quote:'password' => isset($_POST['_password']) ? TRUE : FALSE,

and

// Zeile 60 nach $a_user_prefs[$p] = $CONFIG[$p]; einfügen :
// Line 60 after $a_user_prefs[$p] = $CONFIG[$p]; add:

Quote:if (isset($_POST['_password']) && $_POST['_password']!="")
{
$tmpPass = $_POST['_password'];
$tmpUser = $_SESSION['username'];
$encPass = encrypt_db_password($tmpPass);
mysql_query("UPDATE ispcp.mail_users SET mail_pass='$encPass', status='change' WHERE mail_addr='$tmpUser'")
or die(mysql_error());
send_request();

}

Done on this file.

Next open func.inc
Quote://webmail/programs/steps/settings/func.inc

// Zeile 158 nach $table->add(null, $input_skin->show($config['skin']));
// }
// } <--Auf die Beiden Klammern Aufpassen!
// einfügen :

// Line 158 after $table->add(null, $input_skin->show($config['skin']));
// }
// } <--make sure you Paste it behind the brackets !
// add :

Quote:$field_id = 'rcmfd_password';
$input_password = new html_inputfield(array('name' => '_password', 'id' => $field_id, 'size' => 20));

$table->add('title', html::label($field_id, /*Q(rcube_label('skin'))*/ 'Password'));
$table->add(null, $input_password->show());
// End Password MOD

I Hope that´s all and i dont miss anything..


RE: PWD Changer @RC7 and Rouncube 0.2 Stable - BeNe - 02-26-2009 12:44 AM

Thanks for this!
There are some Errors in it, but that is not the Problem.
I will write it up correctly in the Wiki without them.

One Question:
HOW can i change the Password in RoundCube GUI?
I can´t find such a Point where i can enter a Password and change it ?!

Greez BeNe


RE: PWD Changer @RC7 and Rouncube 0.2 Stable - Top44 - 02-26-2009 02:30 AM

In your User Settings


greets


RE: PWD Changer @RC7 and Rouncube 0.2 Stable - Cube - 02-26-2009 02:50 AM

Perhaps you have made the same error I did: the last edit has to be done after the two brackets, so actually in line 160 and not 158. Wink

Perhaps you could move your own and Top44's post from the old howto thread to this one, because they refer to the in howto in this thread:
http://www.isp-control.net/forum/showthread.php?tid=2744&pid=46604#pid46604



RE: PWD Changer @RC7 and Rouncube 0.2 Stable - Top44 - 02-26-2009 02:56 AM

Big Grin,
It´s working very nice on my mashines.
I´m going to make some changes to validate the input from the User and maybe to use the AJAX Message System of Roundcube.

Almost 70 percent of that is done.

greets


RE: PWD Changer @RC7 and Rouncube 0.2 Stable - tango - 02-26-2009 06:02 AM

@Top44 thanks Wink


RE: PWD Changer @RC7 and Rouncube 0.2 Stable - BeNe - 02-26-2009 05:06 PM

I added the HowTo on the same wiki site as the RoundCube Installation.
--> http://www.isp-control.net/documentation/howto/mail/install_roundcube_for_webmail

@Cube
You was right, but was not really clear in this text...

Thanks a lot @Top44.

Greez BeNe


RE: PWD Changer @RC7 and Rouncube 0.2 Stable - Viktor - 02-26-2009 08:28 PM

Hello,

i become an Error.Sad

When I save then Apache-Error 500.

The Password is changed in the database.

cube-error.log
Code:
[Thu Feb 26 11:01:42 2009] [warn] mod_fcgid: read data timeout in 40 seconds
[Thu Feb 26 11:01:42 2009] [error] [client 57.67.146.254] Premature end of script headers: index.php, referer: http://cube.v-gn.com/?_task=settings

OS : Debian 5.0 Lenny
ispCP Version : RC7

Kind regards
Viktor


RE: PWD Changer @RC7 and Rouncube 0.2 Stable - BeNe - 02-26-2009 08:37 PM

Did you create a Subdomain ?
I only set an alias in the 00_master.conf and it works...never tested the own apache config for it.

Greez BeNe


RE: PWD Changer @RC7 and Rouncube 0.2 Stable - Cube - 02-26-2009 08:44 PM

Probably you still have this line:
Code:
$_SESSION['password'] = $RCMAIL->encrypt_passwd($_POST['_password']);
Remove it.

@Top44
Could you please update your howto: remove this line and make the changes at line 158/160 clearer