Skip to Content

Category Archives: general

script to change cpanel password for many users in server

Written on April 2, 2013 at 5:13 AM, by

First get all the users name in a file : users.txt then touch a file script.sh chmod 755 script.sh copy the following code to that file:   ——————————————————- #!/bin/bash for i in `more users.txt` do randstring=`tr -dc _#$%^\&*\(\)\=A-Za-z0-9\~\+@! < /dev/urandom | head -c 8` echo “$i $randstring” >> newpass.txt /usr/local/cpanel/scripts/realchpass $i $randstring /scripts/mysqlpasswd $i $randstring […]

Bugzilla Installation in cpanel

Written on March 14, 2013 at 5:51 PM, by

Bugzilla can be installed in a cpanel account through the following steps: First of all, its better that we install bugzilla in a sub-domain of the main account. eg: bugzilla.domain.com. * create the new subdomain using cpanel. * extract the latest bugzilla files to the directory ‘bugzilla’. Latest bugzilla tar file can be obtained from […]

fix for packet loss issues in high traffic servers

Written on November 11, 2012 at 5:51 PM, by

Recently there was a high packet loss issue in one of our servers and I implemented the following changes to get this fixed: check the value of following parameter in the server: net.ipv4.netfilter.ip_conntrack_max check this using the following command: /sbin/sysctl net.netfilter.nf_conntrack_max See how connection tracking table is already full can be like this: /sbin/sysctl net.netfilter.nf_conntrack_count […]

reset bandwidth for a domain in WHM/CPANEL

Written on October 25, 2012 at 8:40 PM, by

Follow the below steps to reset bandwidth for a domain.   ssh to your server cd /var/cpanel/bandwidth.cache/ vi domainname.com and/or vi username replace contents with 0 save and quit    

add comment when denying and ip using csf

Written on October 22, 2012 at 2:24 PM, by

This can be done easily as follows: csf -d <ip> <comment> for example: csf -d 11.22.33.44 too many connections This will automatically add the comment “too many connections” to csf.deny file: ——————————————————- # grep 11.22.33.44 /etc/csf/csf.deny 11.22.33.44 # too many connections – Mon Oct 22 12:10:13 2012 ——————————————————– This will help us to keep track […]

Steps to delist a domain which is blacklisted by google

Written on July 11, 2012 at 11:51 PM, by

When searching some domains in google we get an alert as “This site may harm your computer” in the search results. This shows that the domain is blacklisted by google. Another way to check whether the site is blacklisted is using the free site :  sitecheck.sucuri.net Search the domain in question in this site and get […]

Sample yum repo file

Written on June 25, 2012 at 8:35 PM, by

Here is the content for a new repo file that need to be installed in a linux server:   Name the repo file ” CentOS-Base.repo ” in the location /etc/yum.repos.d/   # CentOS-Base.repo # # This file uses a new mirrorlist system developed by Lance Davis for CentOS. # The mirror system uses the connecting […]

command to find the list of open files

Written on June 22, 2012 at 11:49 PM, by

  command to find all the deleted-but-still-open files and see which processes are holding them open: lsof +L1 Open files in a partition: lsof +L1 /usr

command to check zone file format

Written on June 12, 2012 at 11:07 PM, by

Use the following command with the corresponding zone db file :   named-checkzone website.org /var/named/website.org.db  

fix for spamd not starting in server

Written on June 11, 2012 at 7:12 PM, by

In some cases spamd wont start along with exim im in the server. Use the following commands to fix it: sa-learn -D –force-expire sa-update -D /usr/local/cpanel/scripts/spamassassin_dbm_cleaner f/usr/local/cpanel/scripts/fixspamassassinfailedupdate /scripts/restartsrv_spamd If this does not fix the issue, use the following script in the server which installs spamd: /scripts/installspam It is also necessary that interface l0[localhost] is UP […]