Roundcube Community Forum

Third Party Contributions => API Based Plugins => Topic started by: beatnik on November 02, 2009, 06:48:13 PM

Title: Password plugin and CPanel
Post by: beatnik on November 02, 2009, 06:48:13 PM
Has anyone gotten the password plugin for version 0.3.x to work with CPanel?  There are not a lot of options to set for CPanel within the configuration file, but I cannot get it to work!  (I've sent a message to the helpdesk of my hosting service, too, but thought I'd post a question here, too.)

I used to have the CPanel add-on by Nemesis02 installed in my pre-0.2.2 version of Roundcube, and it worked wonderfully.  Since updating to 0.2.2 for security reasons, my users have missed the ability to easily change their password.  I had high hopes to be able to re-implement this capability by using version 0.3.x and the API plugins.

Thanks in advance...
Title: Password plugin and CPanel
Post by: SKaero on November 02, 2009, 11:55:21 PM
In RoundCube 3.1 a cPanel driver was added to the password plugin. Are there any errors, and what version of CPanel do you have?
Title: RE: Password plugin and CPanel
Post by: beatnik on November 03, 2009, 06:11:29 AM
My host has CPanel 11... perhaps that's the issue?  I see the plugin specifies 'x' in the configuration; I tried it with 'x', 'xi', 'XI', and '11' with all the same results - I get an error statement "Could not save new password" when I try and change my password from within the Settings menu of Roundcube.

I did hear back from my host and they verified I am using the correct information for line 165 (password_cpanel_host), line 174 (password_cpanel_port) and line 177 (password_cpanel_ssl TRUE or FALSE) within the config.inc.php file of the RC 0.3.1 password plug-in.
Title: Password plugin and CPanel
Post by: SKaero on November 03, 2009, 10:01:59 AM
That most likely your problem the default theme in CPanel 11 is x3. Here is how the url is setup:
Code: [Select]
http://[B]Host[/B].[B]tdl[/B]:[B]Port[/B]/frontend/[B]Theme[/B]/index.html
http://example.com:2082/frontend/x3/index.html
Title: RE: Password plugin and CPanel
Post by: beatnik on November 03, 2009, 06:03:22 PM
My front-end says the theme is cPanel X v2.5.0... how would that be shown?  'x2' and 'x2.5.0' don't work... I tried 'x3' before realizing the theme wasn't x3.
Title: Password plugin and CPanel
Post by: SKaero on November 03, 2009, 09:09:59 PM
What is your cpanel url?
Title: RE: CPanel URL
Post by: beatnik on November 03, 2009, 10:20:06 PM
your question made me understand!  the URL contained the theme designation, which was "lp" (for Lunarpages, my host) - the plugin now works!  thank you so much....
Title: Password plugin and CPanel
Post by: Yann on November 04, 2009, 07:45:40 PM
Quote from: skaero;22741
That most likely your problem the default theme in CPanel 11 is x3. Here is how the url is setup:
Code: [Select]
http://[B]Host[/B].[B]tdl[/B]:[B]Port[/B]/frontend/[B]Theme[/B]/index.html
http://example.com:2082/frontend/x3/index.html


where within the password config file do I have to set this up? I tried everything but cannot see anything in server settings to change password. I know I'm missing something but I just could not figure it out. Since  Nemesis02 plugin, I did not upgrade RC because I'm afraid of loosing the ability to change password. I have RC intalled on hosted account (hostmonster). Any help!
Title: Password plugin and CPanel
Post by: SKaero on November 04, 2009, 10:07:36 PM
You would set the theme in the plugins/password/config.inc.php file on the $rcmail_config['password_cpanel_theme'] line. To enable the plugin add it to the $rcmail_config['plugins'] line in the config/main.inc.php.
Title: Password plugin and CPanel
Post by: Yann on November 04, 2009, 11:05:47 PM
Quote from: skaero;22785
You would set the theme in the plugins/password/config.inc.php file on the $rcmail_config['password_cpanel_theme'] line. To enable the plugin add it to the $rcmail_config['plugins'] line in the config/main.inc.php.


wow, the tab shows. I figured it out, took me about an hour to understand it though. :) . The bad news is I could not save the new password, it gives me an error message that "Could not save new password". I double checked the cPanel Driver options, all the information are correct. What am I missing?
Title: Password plugin and CPanel
Post by: SKaero on November 04, 2009, 11:41:05 PM
Did you set the $rcmail_config['password_driver'] to cpanel in plugins/password/config.inc.php?
Title: Password plugin and CPanel
Post by: Yann on November 05, 2009, 07:52:14 PM
Quote from: skaero;22787
Did you set the $rcmail_config['password_driver'] to cpanel in plugins/password/config.inc.php?


yes I did. What the problem was, I just changed this:

// The cPanel theme in use
$rcmail_config['password_cpanel_theme'] = 'x';       ----------> the 'x' to 'hostmonster' and it worked :). Thanks
Title: Password plugin and CPanel
Post by: vixus on November 07, 2009, 02:44:28 PM
Code: [Select]
// cPanel Driver options
// --------------------------
// The cPanel Host name
$rcmail_config['password_cpanel_host'] = 'xxx';


Code: [Select]
// XIMSS (Communigate server) Driver options
// -----------------------------------------
// Host name of the Communigate server
$rcmail_config['password_ximss_host'] = 'xxx';


what should i type in these two options ?
Title: Password plugin and CPanel
Post by: beatnik on November 07, 2009, 07:42:27 PM
Vixis,

If your host is using CPanel, you shouldn't have to fill in anything for the second lines of code you listed (for the XIMSS Communigate Server Driver).  For the first lines of code (CPanel Driver), look at the URL that is displayed when you are logged into your host's CPanel.  It should look something like this (my thanks to SKaero!):

'http://xxx:Port/frontend/Theme/index.html

where 'xxx' is what you place in the line:

$rcmail_config['password_cpanel_host'] = 'xxx';

Make sure you include the quotes!  Also, make note of how the theme is shown.  You will need to use the theme designation in the line below, in place of the x.  (This is what I was messing up!)

$rcmail_config['password_cpanel_theme'] = 'x';

I hope that helps!
Title: Password plugin and CPanel
Post by: vixus on November 12, 2009, 10:21:57 AM
Quote from: beatnik;22902
Vixis,

If your host is using CPanel, you shouldn't have to fill in anything for the second lines of code you listed (for the XIMSS Communigate Server Driver).  For the first lines of code (CPanel Driver), look at the URL that is displayed when you are logged into your host's CPanel.  It should look something like this (my thanks to SKaero!):

'http://xxx:Port/frontend/Theme/index.html

where 'xxx' is what you place in the line:

$rcmail_config['password_cpanel_host'] = 'xxx';

Make sure you include the quotes!  Also, make note of how the theme is shown.  You will need to use the theme designation in the line below, in place of the x.  (This is what I was messing up!)

$rcmail_config['password_cpanel_theme'] = 'x';

I hope that helps!


thank you beatnik

it work now after i changed the value

$rcmail_config['password_cpanel_ssl'] = true;
 to
$rcmail_config['password_cpanel_ssl'] = false;
Title: Password plugin and CPanel
Post by: sumit9451 on December 05, 2009, 10:40:37 AM
Helo Friend..
i am also using cpanel hostmonster .. and i am not able to figure out ...

i have done one thing first i have activated the password tab.
and i am getting cannot save password....
Please
Tell me all steps i have to  do because i am little bit dumboo..

In scripts ..

Please please i will be really greatful to you my friend....
thanks:eek::-*0:)
Title: Thankyou
Post by: sumit9451 on December 05, 2009, 10:51:29 AM
hey thanks it worked nowww :) after 2 month i did it...
Title: Password plugin and CPanel
Post by: blair.sawler on December 20, 2009, 08:40:47 AM
How did you get the password plugin to work with hostmonster?
Title: Password plugin and CPanel
Post by: SKaero on December 20, 2009, 10:52:38 AM
How far have you set it up, do you get the password tab in the settings? Also check that you have the theme set up correctly in the settings I think hostmonster theme is hostmonster.
Title: Password plugin and CPanel
Post by: blair.sawler on December 20, 2009, 09:00:31 PM
Hi

I had this and the vacation plugin working perfectly in the .2.x version, so I am really hoping to get these working in .3.x.

Yes I have the tab, and I have the theme set to hostmonster.

I have the following options set, I will mark my questions below with [BTS], if you notice a setting incorrect, I would appreciate your help very much! Thanks!

// P***word Plugin options
$rcmail_config['p***word_driver'] = 'cpanel';

// Determine whether current p***word is required to change p***word.
$rcmail_config['p***word_confirm_current'] = true;

// Require the new p***word to be a certain length.
// set to blank to allow p***words of any length
$rcmail_config['p***word_minimum_length'] = 0;

// cPanel Driver options
// --------------------------
// The cPanel Host name
$rcmail_config['p***word_cpanel_host'] = '';

[BTS] I am not sure what to set the host to? So I know that is one issue.

// The cPanel admin username
$rcmail_config['p***word_cpanel_username'] = 'username';

[BTS] I ***ume I need to set this, I missed  this until now. I ***ume this is the main cpanel user id?

// The cPanel admin p***word
$rcmail_config['p***word_cpanel_p***word'] = 'p***word';

[BTS] I ***ume I need to set this, I missed  this until now. I ***ume this is the main cpanel p/w?

// The cPanel port to use
$rcmail_config['p***word_cpanel_port'] = 2082;

// Using ssl for cPanel connections?
$rcmail_config['p***word_cpanel_ssl'] = true;


// The cPanel theme in use
$rcmail_config['p***word_cpanel_theme'] = 'hostmonster';
Title: Password plugin and CPanel
Post by: SKaero on December 21, 2009, 11:37:29 AM
When you login to you cpanel account that has the email account that you want to be able to change the password on, set the:
Code: [Select]
$rcmail_config['password_cpanel_username']
to that cpanel username that you login in with, and set:
Code: [Select]
$rcmail_config['password_cpanel_password']
to the password that goes with that cpanel account.

When your login look at the url, it should look something like this:
Code: [Select]
http://example.com:2082/frontend/x3/index.html
http://[B]Host[/B]:[B]Port[/B]/frontend/[B]Theme[/B]/index.html

The host is:
Code: [Select]
$rcmail_config['password_cpanel_host']
The port is:
Code: [Select]
$rcmail_config['password_cpanel_port']
The theme is:
Code: [Select]
$rcmail_config['password_cpanel_theme']
Title: Password plugin and CPanel
Post by: Sartuche24 on December 21, 2009, 06:52:59 PM
Okay I can not get this plugin to work with my Hostmonster account. What am I doing wrong. I set the username to my hostmonster username and also the password. I set the host to login.hostmonster.com, the port is at 2083, and the theme is hostmonster. It either gives me an error of can't save password or it just goes back to the password form that is blank. Also ssl is set to false and I do have it set to cpanel for the driver.
Title: Password plugin and CPanel
Post by: SKaero on December 21, 2009, 08:00:21 PM
login.hostmonster.com is not a cpanel login page, it a page witch link to the cpanel login. When you are login to your cpanel account (The one where you can see the port in the url) use that host from that url.
Title: Password plugin and CPanel
Post by: Sartuche24 on December 22, 2009, 08:06:48 AM
Okay I finally got it to work. I just set the host to localhost, the port to 2083, 2082 wasn't working but I was able to locate that it was on port 2083. I also set the ssl to true and it works like a charm.
Title: Not able to save the password
Post by: taxi on January 12, 2010, 07:09:03 AM
Hi,

I am new to this. I am not able to save the password even after activating the password plugin. It says "could not save password". I have the following settings set in plugins/password/config.inc.php

Currently i have the following settings.

// cPanel Driver options
// --------------------------
// The cPanel Host name
$rcmail_config['password_cpanel_host'] = 'localhost';

// The cPanel admin username
$rcmail_config['password_cpanel_username'] = 'username';

// The cPanel admin password
$rcmail_config['password_cpanel_password'] = 'password';

// The cPanel port to use
$rcmail_config['password_cpanel_port'] = 2083;

// Using ssl for cPanel connections?
$rcmail_config['password_cpanel_ssl'] = true;

// The cPanel theme in use
$rcmail_config['password_cpanel_theme'] = 'hostmonster';

$rcmail_config['password_driver'] = 'cpanel';

I have tried entering my username, password & the host for the cPanel but did not help. What am i doing wrong?

Pls help.
Title: Password plugin and CPanel
Post by: SKaero on January 12, 2010, 07:29:37 AM
Look at the url when you go into cpanel
Code: [Select]

http://[B]Host[/B]:[B]Port[/B]/frontend/[B]Theme[/B]/index.html
http://example.com:2082/frontend/x3/index.html

$rcmail_config['password_cpanel_host'] = 'Host';
$rcmail_config['password_cpanel_username'] = 'your cpanel username';
$rcmail_config['password_cpanel_password'] = 'your cpanel password';
$rcmail_config['password_cpanel_port'] = Port;
$rcmail_config['password_cpanel_theme'] = 'Theme';
Title: Password plugin and CPanel
Post by: taxi on January 12, 2010, 07:37:41 AM
I did that & set it to as per your example after looking at the address bar. Still it does not work. Is there any setting in cpanel that needs to be changed?
Title: Password plugin and CPanel
Post by: SKaero on January 12, 2010, 07:46:54 AM
No they isn't anything that needs to be changed in cpanel. If your cpanel url has a http:// not a https:// then $rcmail_config['password_cpanel_ssl'] needs to be false, if that's fine post the error from your error log.
Title: Password plugin and CPanel
Post by: taxi on January 12, 2010, 05:11:41 PM
It is a secured website. I have set the secured option to true.

$rcmail_config['p***word_cpanel_ssl'] = true;
Title: Password plugin and CPanel
Post by: taxi on January 12, 2010, 05:12:50 PM
I have set the secured option to true as it is https

$rcmail_config['p***word_cpanel_ssl'] = true;
Title: Password plugin and CPanel
Post by: taxi on January 12, 2010, 05:22:50 PM
Quote from: skaero;24545
No they isn't anything that needs to be changed in cpanel. If your cpanel url has a http:// not a https:// then $rcmail_config['password_cpanel_ssl'] needs to be false, if that's fine post the error from your error log.


The errors log file in the log folder is blank. There is no log being created for the same.
Title: Password plugin and CPanel
Post by: Yann on January 13, 2010, 09:41:53 PM
Quote from: taxi;24538
Hi,

I am new to this. I am not able to save the password even after activating the password plugin. It says "could not save password". I have the following settings set in plugins/password/config.inc.php

Currently i have the following settings.

// cPanel Driver options
// --------------------------
// The cPanel Host name
$rcmail_config['password_cpanel_host'] = 'localhost';

// The cPanel admin username
$rcmail_config['password_cpanel_username'] = 'username';

// The cPanel admin password
$rcmail_config['password_cpanel_password'] = 'password';

// The cPanel port to use
$rcmail_config['password_cpanel_port'] = 2083;

// Using ssl for cPanel connections?
$rcmail_config['password_cpanel_ssl'] = true;

// The cPanel theme in use
$rcmail_config['password_cpanel_theme'] = 'hostmonster';

$rcmail_config['password_driver'] = 'cpanel';

I have tried entering my username, password & the host for the cPanel but did not help. What am i doing wrong?

Pls help.


Just change  'localhost'  in the line bellow:
 
  // The cPanel Host name
$rcmail_config['password_cpanel_host'] = 'localhost';

to  'hostXXX.hostmonster.com'  (XXX should be the numbers in your Cpanel ulr)

For hostmonster, you should be using the username that shows while login to hostmonster Cpanel, and the password its password (pswrd used to login to Cpanel).
That's how i set mine mine up and it works ever since like a charm.

I don't about any other hosts, but this is what you should do if you host with hostmonster after enabling the password plugin

-----------------------

$rcmail_config['password_cpanel_host'] = 'hostXXX.hostmonster.com'; (XXX = numbers in your Cpanel url)
$rcmail_config['password_cpanel_username'] = 'your cpanel username'; (username found on left while login to your Cpanel on hostmonster.com)
$rcmail_config['password_cpanel_password'] = 'your cpanel password'; (password used to login to your hostmonter.com's Cpanel)
$rcmail_config['password_cpanel_port'] = Port; (port found in your hostmonter.com's Cpanel url)
$rcmail_config['password_cpanel_theme'] = 'hostmonster'; (= hostmonster)
Title: Password plugin and CPanel
Post by: x3digital on January 14, 2010, 12:07:58 PM
Quote from: skaero;22785
You would set the theme in the plugins/password/config.inc.php file on the $rcmail_config['password_cpanel_theme'] line. To enable the plugin add it to the $rcmail_config['plugins'] line in the config/main.inc.php.


I am having trouble getting the password tab to show up. I believe I have made all the necessary chages to the config.inc.php file, but I am unsure what to do in the config/main.inc.php file.  Within that file I have this:

// List of active plugins (in plugins/ directory)
$rcmail_config['plugins'] = array();

I am not sure what to change it to in order to enable the plugin..?

Thanks
Title: RC working with cpanel
Post by: taxi on January 17, 2010, 02:47:23 AM
It is working great now.

Thanks for the help everyone.
Title: Password plugin and CPanel
Post by: Yann on January 17, 2010, 03:55:30 PM
Quote from: taxi;24641
It is working great now.

Thanks for the help everyone.


Glad we can help
Title: Password plugin and CPanel
Post by: blair.sawler on January 22, 2010, 09:11:29 PM
I have  this set up with cpanel, and have the following variables. It is still not working... just says "could not save new password". Here is what I have set. What am I missing?

$rcmail_config['password_driver'] = 'cpanel';

// Determine whether current password is required to change password.
// Default: false.
$rcmail_config['password_confirm_current'] = true;

// Require the new password to be a certain length.
// set to blank to allow passwords of any length
$rcmail_config['password_minimum_length'] = 0;
 
// Require the new password to contain a letter and punctuation character
// Change to false to remove this check.
$rcmail_config['password_require_nonalpha'] = false;


// cPanel Driver options
// --------------------------
// The cPanel Host name
$rcmail_config['password_cpanel_host'] = 'host98.hostmonster.com';

// The cPanel admin username
$rcmail_config['password_cpanel_username'] = 'myusername';

// The cPanel admin password
$rcmail_config['password_cpanel_password'] = 'mypassword';

// The cPanel port to use
$rcmail_config['password_cpanel_port'] = 2083;

// Using ssl for cPanel connections?
$rcmail_config['password_cpanel_ssl'] = true;

// The cPanel theme in use
$rcmail_config['password_cpanel_theme'] = 'hostmonster';
Title: Password plugin and CPanel
Post by: SKaero on January 23, 2010, 01:17:40 PM
Check you CPanel username and password if they are correct check your RoundCube's error log in /logs
Title: Password plugin and CPanel
Post by: blair.sawler on January 23, 2010, 01:40:37 PM
Quote from: skaero;24808
Check you CPanel username and password if they are correct check your RoundCube's error log in /logs


Error log was not updated, so nothing written in there.

Maybe I will try uninstalling this from the server and reinstalling everything.

Frustrating as heck!
Title: Password plugin and CPanel
Post by: Yann on January 24, 2010, 11:26:21 PM
Quote from: blair.sawler;24810
Error log was not updated, so nothing written in there.

Maybe I will try uninstalling this from the server and reinstalling everything.

Frustrating as heck!


I'm not sure if you have the right port number on there. Check the port number again in your hostmonter cpanel url while login.
Title: Password plugin and CPanel
Post by: RickSG on January 25, 2010, 08:21:59 AM
You might want to look at the solution in this thread that worked for us with cpanel.

http://www.roundcubeforum.net/7-third-party-contributions/46-api-based-plugins/6019-cpanel-password-plugin-update.html
Title: I still cant get the plugin working
Post by: nevets007 on February 21, 2010, 02:51:41 PM
Quote from: skaero;22785
You would set the theme in the plugins/password/config.inc.php file on the $rcmail_config['password_cpanel_theme'] line. To enable the plugin add it to the $rcmail_config['plugins'] line in the config/main.inc.php.


I dont think I'm doing this right... I tried different things and I don't even see the tab.

What do I need to write in XXX? to activate the plugin.

$rcmail_config['plugins'] = 'XXX';

Thanks for your help in advance!
Title: Password plugin and CPanel
Post by: ataman on April 01, 2010, 07:47:26 AM
Hi everyone!

I need some help too!

Ok my host provider is using Cpanel. He offers me a local installation of roundcube, but I don't like how it set up.

So I install a new version of roundcube 0.3.1 on a different place:
mydomain.com/round

All is working. Now I activated the password plugin , and in the settings I have a tab where the users can change their password. But when they click Save, they are receiving the error "Could not save the new password".

So I open my config.inc.php.list file and edit next:

Code: [Select]

// A driver to use for password change. Default: "sql".
// Current possibilities: 'directadmin', 'ldap', 'poppassd', 'sasl', 'sql', 'vpopmaild', 'cpanel'
$rcmail_config['password_driver'] = 'cpanel';


after that I change on the same file next lines :
Code: [Select]

// cPanel Driver options
// --------------------------
// The cPanel Host name
$rcmail_config['password_cpanel_host'] = 'https://mydomain.com';

// The cPanel admin username
$rcmail_config['password_cpanel_username'] = 'myCpanelusername';

// The cPanel admin password
$rcmail_config['password_cpanel_password'] = 'myCpanelPassword';

// The cPanel port to use
$rcmail_config['password_cpanel_port'] = 2083;

// Using ssl for cPanel connections?
$rcmail_config['password_cpanel_ssl'] = true;

// The cPanel theme in use
$rcmail_config['password_cpanel_theme'] = 'x';


Even that I receive the same error "Could not save the new password" :mad:

Is all this is correct? Is there any other options which I must change ?
I will be happy if somebody could help me!

Thanks in advance!
Title: Password plugin and CPanel
Post by: SKaero on April 01, 2010, 09:34:34 AM
You need to rename config.inc.php.dist to config.inc.php also check that your password_cpanel_theme is correct.
Title: Password plugin and CPanel
Post by: ataman on April 01, 2010, 10:40:03 AM
yes I renamed now the file cinfig.inc.php
Yes I'm using the correct theme it's "x"

how exactly I must write the host ? Like this ? :

https://mydomain.com:2083/frontend/x3
Title: Password plugin and CPanel
Post by: SKaero on April 01, 2010, 10:48:43 AM
Look at this post http://www.roundcubeforum.net/7-third-party-contributions/46-api-based-plugins/5715-password-plugin-cpanel-3.html#post24104 for the url details but if your cpanel url is https://mydomain.com:2083/frontend/x3 then the theme would be x3
Title: Password plugin and CPanel
Post by: ataman on April 01, 2010, 11:00:52 AM
Thank you

now the users can change their password, but when they press Save, they got the message "Could not save new passord", But the password is changed, so how can I  change this error ??


Anyone can tell me how to fix this error message ?