How to trap cPanel ( WHM ) Password Modification

If your account is hosted on Linux hosting server then most webhosting service provider will offer you WHM/cPanel as hosting control panel depending on hosting package you choose. WHM/cpanel offer you large number of features using which you can manage your hosting account or website very easily. you can set/reset password of cpanel, can manage email accounts, hosting accounts, can easily disk quota, create FTP accounts, setup CMS etc….. Most important feature you have with these control panels is that you can change password of cpanel using cpanel aswell as WHM. You may have to change reset your control panel password for some security reason, thus this feature is very important for all webmasters.

 

If you want to know the password which have changed password of cpanel then you need to create a module in /usr/local/Cpanel/ChangePassword/. This will run as root when password is changed in WHM or cPanel.



Module features :
You can access following variables using above module :
- user (string) - Account Username
- newpass (string) - Account Password
- message (string)*** - Password Change Status Message
- rawout (string)*** - Password Change output
- service_ref (string)*** - Password Change Service

Thus in order to access above module you will have to do the following :



#!/usr/bin/perl
package Cpanel::ChangePassword::Sendtobilling;
use strict;



my %OPTS = @_;
my $user = $OPTS{’user’};
my $newpass = $OPTS{’newpass’};
#Add function to create object and password send

Username / Password can then be send to remote location thus you can retrieve password which have tried to change password of cpanel.

  • 30 Users Found This Useful
Was this answer helpful?

Related Articles

 How To Change Your Account Details

Your UnelmaHost.com Account is how you control your domains, servers and all of the services that...

 How to add a range of IPs on a BSD box.

FreeBSD is a popular free Unix like open source operating system that is based on the Berkeley...

 Password protecting a directory with Apache and .htaccess

 Password protecting a directory with Apache and .htaccess

The Apache web server can read .htaccess files located anywhere in your document root to perform...

 How to trap cPanel ( WHM ) Password Modification

Monitoring PowerDNS is easy with MRTG, just install these two packages and create a config file...