Wednesday, December 18, 2013

Account DNS Check plugin for cPanel/WHM

This plugin gives administrators the ability to easily get a list of domains on their cPanel/WHM server that do not resolve to the correct IP. This is very helpful when doing server to server transfers, or auditing a server to remove old accounts. You can run this script and easily see a list of domains that are pointing to the old server or customers who are no longer hosted on their server.


Account DNS Check screen shot running from the WHM Account DNS Check screen shot running from the command line
Installation Instructions
The installation proceedure for this plugins requires that you have root access to the server via the console or SSH. Below are step by step instructions you should use to install this plugin.

# cd /home
# rm -f latest-accountdnscheck
# wget
# sh latest-accountdnscheck
Using the plugin from the WebHostManager
Log into the WHM, click on plugins, then Account DNS Check. Depending on how many domains are on the server, the speed of your resolver, how many domains dont resolve, etc, the plugin may take a few minutes to show you the output.

Using the plugin from the Command Line
For those of you who would rather execute this plugin through the command line that can be done too.

# /var/cpanel/accountdnscheck/scripts/

Sunday, December 15, 2013

“exim dead but subsys locked”,

1) Stop the service

/etc/init.d/exim stop
service exim stop
2) Create an empty file called "eximdisable" under "/etc"
touch /etc/eximdisable
That’s it!! Now when you try to restart or start the exim service, you will get the following error.

/etc/init.d/exim status
exim dead but subsys locked
That’s means it will remain stopped and “chkservd” can’t start it! :)

So if you ever found the error “exim dead but subsys locked”, now you know how to fix it. It’s simple. Just remove that “eximdisable” file. Then you are good to go.

rm -rf /etc/eximdisable
Now you know how to disable exim and how to fix the error “exim dead but subsys locked” :)

Let us know if you face any further issues. We will be right here for your help.

Saturday, December 14, 2013

Cpanel Moving accounts from one partition (hard drive) to another

(Home >> Account Functions >> Rearrange an Account)


Rearrange an Account
To change an account’s hard drive:
Select the desired account from the list.
You may use the Account Search feature to search for an account by domain or by user.

Click Rearrange.
Select the drive from the menu.
note Note: To move accounts between hard drives, each hard drive must match the value of /home set in the Basic cPanel & WHM Setup Basic Config section. Any additional home directories which match the value set in Basic cPanel & WHM Setup will also be used for new home directory creations. For example, /home, /home2, /newhome. If the value does not match the hard drive, you can not move the account. This feature is disabled if left blank.

Click Move Account.

modsec'@'localhost' (using password: YES) Mod security Plugin

Error .

The mod_security plugin could not connect to the database. Please verify that MySQL is running. Error: Access denied for user 'modsec'@'localhost' (using password: YES)


grep dbpassword /etc/cron.hourly/

GRANT ALL ON modsec.* TO 'modsec'@localhost IDENTIFIED BY 'odu6lGYKAIyP';

Sunday, December 1, 2013


While working on linux production boxes,some times system admin mistakenly delete LVM partitions. Using the command “vgcfgrestore” we can recover deleted LVM partitions. Linux keeps the backup copies of lvm configuration  in the /etc/lvm/archive directory. In my scenario I have deleted 10GB lvm partition, follow the below steps to recover the LVM partition :

Step:1 First find the backed up configurations of Volume Group (my-vg)

Synatx :

# vgcfgrestore --list   < Volume-Group-Name >

# vgcfgrestore --list my-vg


As you can see in the above example correct configuration are backed up , in my case “” is correct file throug which I will recover my lvm partitions.

Step:2 Now recover the LVM partition using vgcfgrestore and archive file

# vgcfgrestore -f /etc/lvm/archive/<file-name> <Voulme-Group-Name>

# vgcfgrestore -f /etc/lvm/archive/  my-vg

Ouptput would be : “Restored volume group my-vg”