WordPress Developer & Linux Administrator

cPanel

Bash script to suspend all of a reseller's cPanel accounts

Simple Bash script to suspend all of a reseller’s user accounts on a cPanel web server. It gets an accurate list of the reseller user’s sub-accounts on the cPanel server, and suspends each of them.

Continue Reading

Bash script to fix permissions on a cPanel web server

Colin at ServInt created it. Boom Shadow modified it. Now I’ve enhanced it to do more.

This version is exactly the same as Boom Shadow’s version, however, I’ve modified it to support additional /home directories so that permissions extend beyond just the default /home directory.

Continue Reading

Bash script to scan reseller's accounts for malware

The ConfigServer eXploit Scanner (cxs) is a very powerful tool for cPanel web hosting servers. While not free, it provides active scanning of files as they are uploaded to the server, and so much more. It truly is one of the best clean-up and discovery tools out there for someone with a cPanel server. With over 3,000 known exploit script fingerprint matches (in addition to standard ClamAV detection), CXS is sure to catch most of what your clients’ sites may be hiding.

CXS let’s you scan per domain, by first letter, or by scanning your entire home directory (ie., all cPanel accounts) for malware. But what if you want to do this on a reseller basis? This script will do just that. It will take input via reseller username on the server, and will perform a detailed scan (with quarantine) for each of that reseller’s hosted accounts!

Continue Reading

Log file locations on a cPanel web server

cPanel is the largest web hosting control panel in the world. Learning where each of the cPanel log file locations are can be an indispensable resource when trying to troubleshoot an issue with your cPanel web server. Following is a list of log file locations for cPanel.

Continue Reading

Bash script to DNS lookup for cPanel reseller

This bash script will take a given cPanel reseller, find all of its users, fetch all cPanel domains related to the user, and perform a dig DNS lookup on each of the cPanel domain names. By default, it performs a lookup of just an A record, however, you can customize the -t flag to any number of other DNS lookups. Such as: A, TXT, MX, NS, SOA, HINFO, or AXFR.

Continue Reading