How to find out the make, model and serial number for SCSI or IDE hard disks under the CentOS Linux server?

Read More

Abhishek | Monday 30 September 2013 - 8:38 pm | | Default | No comments

Changing your language preference in Horde webmail

1- First login to your email account through the Horde webmail client.

2- Click on "Options" from above.

3- Click on "Locale and time".

4 - From "Select your preferred language" option, you can select or change the laguage according to you.

Akash | Sunday 29 September 2013 - 8:05 pm | | Default | One comment

Converting HTML pages into the PDF form on a Linux machine

If you have a Linux machine and want to save an HTML page from the Internet into the PDF format, then you can do that from the Linux machine and save that page for future aspects with the help of the tool "wkhtmltopdf".

It is very easy to install this tool on the Linux machine and it's in the readymade format of the binary package - you just need to download and use it.

Follow the steps below to use the 'wkhtmltopdf' tool for converting HTML into the PDF page:-

Step 1: Download 'wkhtmltopdf' into your Linux machine and make it usable like below :-

tar -xjf wkhtmltopdf-0.10.0_rc2-static-amd64.tar.bz2
mv wkhtmltopdf-amd64 wkhtmltopdf
mv wkhtmltopdf /usr/local/bin/

After this, you can check wkhtmltopdf's version number using the command below:-

wkhtmltopdf -V

Step 2: Download the HTML page into any temporary location on the Linux machine:-

wget -p

Step 3: Convert the HTML page into the PDF form

wkhtmltopdf index.html index.pdf

and then check the PDF page anytime.

Sachin | Sunday 29 September 2013 - 07:30 am | | Default | No comments
Used tags: , , , ,

Enabling the autoresponder in MailEnable

1) Open the MailEnable administrator.
2) Go on Post office>>Domain name>>Mail box.
3) Now right click on the mail box for which you need to enable autoresponder. You will see the pop-up for managing email settings for the email account.
4) Click on the action tab and check the box to "Enable the auto-responder". Write the required subject and message there and apply the settings for them.
5) Then restart the MailEnable services. You will be able to use the MailEnable function without any issue.

Ashwani | Saturday 28 September 2013 - 8:54 pm | | Default | One comment

Steps to move a domain from an existing web server to a new web server under an H-Sphere reseller account

1) Please take a backup at your end of your domain webfiles and emails and then delete the domain from the existing user account.

Note:- We do not offer email backup. So we strongly recommend you take a backup of all your mail boxes at your local end. We do offer a backup for webfiles.

2) Create a new user account aganist a Windows plan under your reseller account. It will go on our new web server and have new resources.

3) Add the domain in the new user account and upload files there. You will also need to create mailboxes again in the new user account.

Note:- With the steps above, you will be able to move your existing domain from Windows 2003 to the Windows 2008 server yourself and get IIS 7.5 for your domain also.

Shubham | Saturday 28 September 2013 - 08:36 am | | Default | No comments

Error while activating an API key in Wordpress for cURL

Sometimes while activating an API for WordPress, we get the error below when cURL is enabled.

Error :-
CURL error: SSL certificate problem, verify that the CA cert is OK.
Details: error: 14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify

Cause :- This error means that cURL’s CA cert bundle on your server is out of date or does not exist.

Fix :-

If you get this error for a website hosted on a Windows server, then you need to follow the steps below:-

1) Make sure you've first got the Curl's CA cert available on the server and it shouldn't be outdated.

2) If it's not avaialble then first download it from the link below:-

3) After this, update the php.ini file by adding the line below:-

curl.cainfo = "PATH_TO/cacert.pem"

Restart web services and then again try to activate the API Key and this should have fixed the issue.

Sachin | Friday 27 September 2013 - 10:27 pm | | Default | No comments

Problem with Windows Live Mail - Error ID: 0x800CCC0E

Sometimes when sending an email, Windows Live Mail throws an error :-

Windows Live Mail Error ID: 0x800CCC0E
Protocol: SMTP
Port: 25
Secure(SSL): No
Socket Error: 10060

To fix this, use the SMTP alternative port 587 as mostly this happens due to a block on the SMTP port 25 from the ISP side that doesn't allow the mail client to communicate with the mail server.

So changing the port to 587 will allow the mail client to connect with the mail server and the issue will be fixed.

Sachin | Wednesday 25 September 2013 - 10:44 pm | | Default | Two comments

How to restart MySQL from the server if it is taking many connections

Steps to restart the MySQL service if it is taking many connections :-

step1  pgrep mysql (it will show the processes' ids)
step2  pgrep mysql > mysql.txt
step3  for i in `cat mysql.txt`; do { kill -9 $i; }; done;
step4  /etc/init.d/mysql start

Abhishek | Wednesday 25 September 2013 - 8:18 pm | | Default | No comments

Steps to restart the MSSQL server services

You can re-start the SQL server in 3 ways:

1. Management Studio - Open the Management Studio, connect to the server, right-click on the server name and click restart.

2. SQL Server Configuration Manager - Open the SQL Server Configuration Manager from

-  All Programs

-  Microsoft SQL Server

-  Configuration Tools

-  SQL Server Configuration Manager

-  Right click on the SQL Server Instance name and restart.

3. From Services - Open services.msc and restart the SQL server.

Shubham | Wednesday 25 September 2013 - 09:20 am | | Default | No comments

ip_conntrack: table full, dropping packet

Check ip_conntrack_max on server :-
# cat /proc/sys/net/ipv4/ip_conntrack_max

Count ip_conntrack_max on server
# cat /proc/sys/net/ipv4/netfilter/ip_conntrack_count

Set new value of ip_conntrack_max
# echo 65254 > /proc/sys/net/ipv4/ip_conntrack_max

Manoj | Wednesday 25 September 2013 - 09:18 am | | Default | No comments

How to join multiple files in Linux

If we want to merge file1, file2 and file3, then we run the command below:

cat file1 file2 file3 > file4

Vimal | Tuesday 24 September 2013 - 09:08 am | | Default | No comments
Used tags: , , , ,

Testing the network performance using Iperf

To test the network performance of a server or machine, we've an open source tool using which we can test network performance i.e. Iperf. Iperf is very reliable for testing the network performace and measuring network performance between two servers.

It's quite easy to install on the client end using the yum utility on the Linux machine and then one can see it used like below:-

iperf -s <server IP or hostname>

Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)

[  3] local port 4000 connected with port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  1.1 GBytes  1.09 Gbits/sec

That's it.

Sachin | Tuesday 24 September 2013 - 08:07 am | | Default | No comments

How to create a H-Sphere user control panel settings XML file

Login the H-Sphere control panel server as a cPanel user:-

[[email protected] jhsrvadmin]# su -l cpanel

-bash-3.2$ java psoft.hsphere.migrator.UsersInfoExtractor -force -users -usersbynames <user>

Manoj | Friday 20 September 2013 - 01:34 am | | Default | No comments

Disk Analyzer tool to check disk usage

If you're facing issues with the default system utilities checking for disk usage, then there is a nice
tool to check the disk usage i.e. NCDU (NCurses Disk Usage). You just need to install it at once and then
you can simply run the command as 'ncdu' at any directory and it'll show the disk space used by the
directories and files there. Below is the process to install it :-

Step 1: Download the latest version of the package from the link below of its official site:-

Step 2: Extract the package using tar.

Step 3: Get inside the package using cd ncdu-x

Step 4: Run the commands below one by one and install it :-

./configure –prefix=/usr


make install

That's it.

Now, go inside / , /root, /var, /home/ and then run the command as below :-

ncdu [Enter]

Then it'll show the disk usage for the directories and files present at your current location.

Sachin | Thursday 19 September 2013 - 04:50 am | | Default | No comments

Allowing specific users for SSH logins

Open the /etc/ssh/sshd_config file

Add an AllowUsers line at the bottom of the file and write the name of the user for whom you want to allow SSH

Allow Users user1 user2 user3

Now only user1, user2 and user3 can login though SSH.

Vimal | Tuesday 17 September 2013 - 07:29 am | | Default | No comments
Used tags: , ,

Enabling custom ports for access to the Linux server via SSH

Making SSH (secure shell) access to the server easily available is not a good idea. For this, we should turn firewall access to the server off on the default port 22 and provide access only to a known IP address. However, this is not always possible.
One other way to secure access to the server is to change the default SSH port from 22 to something else. To do this we can follow the steps below:-

Step 1: Login onto the Linux server.
Step 2: Go to file /etc/sshd/sshd_config and find the line as => #Port 22
Step 3: Remove the command from the start and make it as => Port 23456 .
Step 4: After this restart the SSH service and log out from the server. Now check for SSH access on port 22 and you won't be able to do so.
Step 5: Then try to do SSH access on the server on port 23456 and login onto the server.

That's all to be able to secure SSH access to the server on a default port.

Sachin | Tuesday 17 September 2013 - 07:20 am | | Default | No comments
Used tags: , , , , , ,

How we can update AWStats manually (Unix server)

1. Go to the Unix server.
2. cd /hsphere/shared/awstats/wwwroot/cgi-bin
3. Run the command for updating the domain (perl -update)
[It will be like /hsphere/shared/awstats/wwwroot/cgi-bin/perl -update]

Note: First disable and enable AWStats before manually updating it, or it will create the required files with wrong permissions and automated updates won't work. Also check the permission of the cgi-bin folder like 755.

Abhishek | Sunday 15 September 2013 - 8:18 pm | | Default | No comments

Problem attaching a file in an email message?

Please keep the points below in mind:-

>> The file size should not be large.
>> Check if lots of programs are running.
>> Check if the connection speeds are slow.

Vimal | Sunday 15 September 2013 - 08:40 am | | Default | No comments

Monitoring the real-time logs on the server

Sometimes we need to check out the logs or we can say real-time logs occurring on the server for a particular
service. For example: to check the logs for a website or for mail or for a database but at the same time when you're using that service on your end locally or remotely.

So the Tail command is quite useful to check for the real-time logs of the particular service on the server with the -f option.

[[email protected] ~]# tail -f /var/log/httpd/error_log

So the above command will continuously show the real-time logs for the httpd error on the website.

Sachin | Friday 13 September 2013 - 06:23 am | | Default | No comments

Disabling ping for the Linux server in order to stop a network/ICMP flood

There are times when a hacker sends ICMP messages in a huge quantity due to which the network gets completely jammed and the server is not accessible over the network. This scenario is commonly known as an ICMP flood.

In such cases, to stop such an ICMP flood we should first stop the ping for the server's IP address.

To stop the ping of the server's IP addresss, use the command below:-

Go to the file /etc/sysctl.conf and use "Change the value" for the below as mentioned :-

net.ipv4.icmp_echo_ignore_all = 1

and then run the command sysctl -p

or you can directly run the command below to set the value in the file :-

 echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all
Once the ping request for the server has been disabled, the ICMP flood goes down and all the
services except ping are functioning normally.

Sachin | Thursday 12 September 2013 - 06:02 am | | Default | No comments
Used tags: , , , , , ,

Fixing mail errors related to the MIME type

If you are getting a MIME-type related error while sending email from Yahoo to a JodoHost hosted domain, then you need to allow such a MIME type for the domain.

Error message:- Remote host said: 554 sorry, the text/html mime type of the message is in the list of denied for delivering (#5.6.0) [BODY]

Solution:- Allow the text/HTML MIME type in your antivirus program (in the mail manager section in the H-Sphere control panel)

Help Guide:-

Manoj | Thursday 12 September 2013 - 01:22 am | | Default | No comments

Steps to change the mailbox password in the H-Sphere control panel without knowing the old password

Please follow the steps below:-

1) Please login to your H-Sphere control panel.
2) Select Mail Info >> Mail Manager.
3) Select "Domain" from the dropdown menu and then click on "Go".
4) Search for the desired mailbox and then click on it.
5) On the next page, write the new password and then confirm the password in the respective field and click on Submit.

Shubham | Wednesday 11 September 2013 - 08:54 am | | Default | No comments

MySQL is running but the PID file cannot be found?

Sometimes when we try to stop the mysqld service on the server we get the error below :-

MySQL is running but PID file could not be found [Failed]

There are several reasons why one may get this error. No pid file may be present in the path "/var/run/mysql/" due to which this would happen.

In that case, the steps below may fix the problem:-

Make sure /var/run/mysqld is present and if not then create that directory using mkdir/var/run/myslqd

Then create a pid file as below :-


and change its ownership to mysql:mysql as below :-

chown mysql:mysql

and then restart the mysqld service and it shouldn't give you any error this time.

Sachin | Monday 09 September 2013 - 01:35 am | | Default | No comments
Used tags: , , , , ,

How to check the architecture (32 bit or 64 bit?) on a Linux machine

The following commands can be used to see the server architecture:-

getconf LONG_BIT
 uname -m

Abhishek | Sunday 08 September 2013 - 8:37 pm | | Default | No comments

How to create multiple directories through a single command

mkdir -p /directory1/directory2/directory3/directory4/directory5

The command above will create 5 directories in one go.

Vimal | Sunday 08 September 2013 - 08:18 am | | Default | One comment
Used tags: , ,

Lock/unlock a Linux user account

There are times when we need to remove a user account that is not in use but sometime later we'll need that again and then we always think at that time that if we hadn't removed that account we could have used it.

So there is a good way in Linux by which we can make an account unusable until an administrator wants to make it usable again, i.e. we can lock the account.

We can lock a user account in Linux and then that account won't be accessible until the administrator unlocks it. Below is the process to do this.

To lock a user account, use the command below:-

passwd -l username

To unlock a user account, use the command below:-

passwd -u username

Sachin | Friday 06 September 2013 - 8:21 pm | | Default | No comments

Steps to reset/change the password of a MSSQL database user in the H-Sphere control panel

Please follow the steps below:

1) Login to your H-Sphere control panel.
2) Select Database >>> MSSQL >> MSSQL logins.
3) On the next page that appears, you will be able to see all of your created database users.
4) In front of each database user, you can see "Change login password" under the controls section.
5) Click on it and set the new password and then click on "Change".

Shubham | Friday 06 September 2013 - 06:35 am | | Default | No comments

Soft links and hard links

Soft link :-

Soft links or symbolic links refer to the association of multiple filenames for a single file.

For example: How to create a soft link:-

ln -s /path/to/file1.txt /path/to/file2.txt

Hard link :-

Hard links refer to the physical location of data and don't link the directories and are always associated with the source.

For example: How to create a hard link:-

ln {source} {link}

Sachin | Thursday 05 September 2013 - 8:23 pm | | Default | No comments
Used tags: , ,

How to decrypt a private key through the Linux command line

Save the encrypted key in the file enc.key and run the command below and paste the password. You will get the decrypted key in the file dec.key.

[[email protected] ~]# openssl rsa -in enc.key -out dec.key
Enter the passphrase for enc.key:
Writing the RSA key
[[email protected] ~]# ll
total 8
-rw-r--r-- 1 root root 1679 Sep  5 07:10 dec.key
-rw-r--r-- 1 root root 1766 Sep  5 06:49 enc.key

Manoj | Thursday 05 September 2013 - 06:27 am | | Default | No comments

Sub-FTP account option not visible in the H-Sphere control panel?


The reseller needs to enable the FTP account/subaccount option in the respective plan, after which the users will be able to see the "system accounts" option under the FTP section in their user panel.

Shubham | Wednesday 04 September 2013 - 11:37 pm | | Default | No comments

How to assign an IP on the Linux machine with the ifconfig command

#/sbin/ifconfig eth0 <IP address> netmask <Netmask>


#/sbin/ifconfig eth0 netmask

Manoj | Wednesday 04 September 2013 - 08:35 am | | Default | No comments

How to redirect an old document to a new document using the .htaccess file in the Linux command mode

You need to do the entry below in your .htaccess file for redirection:-

Redirect 301 /oldfile.html

Vimal | Wednesday 04 September 2013 - 08:25 am | | Default | No comments

How to check for bad sectors on a drive and repair them

A bad sector is a sector on a disk drive or in memory that cannot be used due to permanent damage or an OS inability to access it.

Badblocks is a Linux utility that one can use to find out the bad sectors on a disk drive.

For ex-

badblocks -v /dev/vda2

We will thus see the badblocks on the disk drive. Also we can redirect the output to the file as well:-

badblocks -v /dev/vda2 > bad-sectors

Once we'll know about the bad sectors in the drive, we can try to fix/repair the errors using the file system check utilities of Linux like the e2fsck command below :-

e2fsck -y /dev/vda2

Note: However, it is always recommended to use e2fsck only when you have unmounted the disk drive in the single-user mode, otherwise there will be possibilities of data loss at that time.

Sachin | Tuesday 03 September 2013 - 8:05 pm | | Default | One comment

How to add back all the dedicated IPs on the H-Sphere controlled server if the IPs vanish from there?

Read More

Abhishek | Monday 02 September 2013 - 9:09 pm | | Default | No comments

How to stop directory browsing in Apache

Sometimes we've seen that when we browse a domain, we see the directory contents in the browsing mode which is not good from the perspective of security.

For a particular domain, we can stop this with .htaccess using the directive below:-


Options -Indexes


Similarily, if we want to enable the indexing we can use the directive below:-


Options +Indexes


That's it.

Sachin | Monday 02 September 2013 - 7:22 pm | | Default | No comments

How to find out information about your CPU in the Linux command mode

If you want to know everything about your CPU, then run the command below.

less /proc/cpuinfo

Vimal | Monday 02 September 2013 - 08:21 am | | Default | No comments