Author Topic: Configure password plugin on cpanel server  (Read 2375 times)

Offline samuelmf

  • Newbie
  • *
  • Posts: 9
Configure password plugin on cpanel server
« on: July 29, 2020, 01:23:53 PM »
Hi i have installed rouncube manually on a directory on my server
I enabled the password plugin and login with my user and pass, when i use the password menu on the roundcube interface i put the old and the new password and click save, then i get a message with "Could not save new password"

What i need to configure to make it work under server with cpanel?

Offline samuelmf

  • Newbie
  • *
  • Posts: 9
Re: Configure password plugin on cpanel server
« Reply #1 on: July 30, 2020, 12:18:09 AM »
Well i made this work

On this line i put this:
// See README file for list of supported driver names.
$config['password_driver'] = 'cpanel_webmail';

And on the cpanel section i put the right config on the cpanel section

// cPanel Driver options
// --------------------------
// The cPanel Host name
$config['password_cpanel_host'] = 'yourdomain.com';

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

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


At this point i logged in to my cpanel and go to Security/Manage Api Tokens and created a new token and pasted on this section.

// The cPanel admin hash
// If you prefer to use a hash (Remote Access Key) instead of plain password, enter it below.
// Hash takes precedence over password auth.
// You can generate a Remote Access Key in WHM -> Clusters -> Remote Access Key
$config['password_cpanel_hash'] = 'remotekey';


// The cPanel port to use
$config['password_cpanel_port'] = 2087;


// cPanel Webmail Driver options
// -----------------------------
// The cPanel Host name
$config['password_cpanel_webmail_host'] = 'mail.yourdomain.com';

// The cPanel port to use
$config['password_cpanel_webmail_port'] = 2096;

I hope this could help others with the same doubt.

Offline kozmonaut

  • Newbie
  • *
  • Posts: 1
Re: Configure password plugin on cpanel server
« Reply #2 on: December 30, 2021, 01:56:35 AM »
Hello Samuel,
Very cool you shared what worked for you here. Many people have been through this problem, just as I have.

A tip, instead of putting API and filling all these login and password options, just fill this ​field:
Code: [Select]
$config['password_cpanel_webmail_host'] = 'mail.yourdomain.com';
The "cpanel_webmail" you added there at the beginning in $config['password_driver'] is pulling only the "cPanel Webmail Driver options" fields, ​so you don't need to fill the "cPanel Driver options" fields.

Remembering that the current cPanel version (100.0.5) is using the version 1.4.12 of Rouncube. As pointed out in the link below, the old "cpanel" driver (incompatible with the current cPanel because of XMLAPI.PHP) has been removed and the current "cpanel_webmail" has been renamed to "cpanel".

https://github.com/roundcube/roundcubemail/issues/7780

So you need to remember to change "cpanel_webmail" to "cpanel" in upcoming updates.