Current time: 05-18-2022, 01:00 AM Hello There, Guest! (LoginRegister)


Post Reply 
PWD Changer @RC7 and Rouncube 0.2 Stable
Author Message
Top44 Offline
Member
***

Posts: 271
Joined: Sep 2007
Reputation: 1
Post: #1
PWD Changer @RC7 and Rouncube 0.2 Stable
// EDIT
Please use the Wiki Version --> http://www.isp-control.net/documentation...or_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..
(This post was last modified: 02-27-2009 11:28 PM by BeNe.)
02-24-2009 12:58 AM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #2
RE: PWD Changer @RC7 and Rouncube 0.2 Stable
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
02-26-2009 12:44 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Top44 Offline
Member
***

Posts: 271
Joined: Sep 2007
Reputation: 1
Post: #3
RE: PWD Changer @RC7 and Rouncube 0.2 Stable
In your User Settings


greets
02-26-2009 02:30 AM
Find all posts by this user Quote this message in a reply
Cube Offline
Member
***

Posts: 740
Joined: Apr 2007
Reputation: 9
Post: #4
RE: PWD Changer @RC7 and Rouncube 0.2 Stable
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/showthr...4#pid46604
02-26-2009 02:50 AM
Find all posts by this user Quote this message in a reply
Top44 Offline
Member
***

Posts: 271
Joined: Sep 2007
Reputation: 1
Post: #5
RE: PWD Changer @RC7 and Rouncube 0.2 Stable
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
(This post was last modified: 02-26-2009 02:56 AM by Top44.)
02-26-2009 02:56 AM
Find all posts by this user Quote this message in a reply
tango Offline
Member
***

Posts: 461
Joined: Jun 2007
Reputation: 0
Post: #6
RE: PWD Changer @RC7 and Rouncube 0.2 Stable
@Top44 thanks Wink
02-26-2009 06:02 AM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #7
RE: PWD Changer @RC7 and Rouncube 0.2 Stable
I added the HowTo on the same wiki site as the RoundCube Installation.
--> http://www.isp-control.net/documentation...or_webmail

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

Thanks a lot @Top44.

Greez BeNe
(This post was last modified: 02-26-2009 05:16 PM by BeNe.)
02-26-2009 05:06 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Viktor Offline
Junior Member
*

Posts: 118
Joined: Nov 2006
Reputation: 1
Post: #8
RE: PWD Changer @RC7 and Rouncube 0.2 Stable
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
02-26-2009 08:28 PM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #9
RE: PWD Changer @RC7 and Rouncube 0.2 Stable
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
02-26-2009 08:37 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Cube Offline
Member
***

Posts: 740
Joined: Apr 2007
Reputation: 9
Post: #10
RE: PWD Changer @RC7 and Rouncube 0.2 Stable
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
02-26-2009 08:44 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)