System Administration

System Administration - Tips, Guidelines, HowTo's

Zyxware conducting one week System Administration training at Santhigiri Ashram from Mar 1 - 5, 2014

Zyxware Technologies in association with Santhigiri Ashram is conducting a 5 days System Admin Training from March 1 to 5, 2014 at Training Centre, Santhigiri Ashram, Pothancode, Thiruvananthapuram. The course is for professional system administrators who have limited or no experience in GNU/Linux or Unix environment.

Course Details

How to unblock blacklisted IP addresses on a WHM based GNU/Linux server

On certain servers, there are chances of our IP addresses getting blocked when we accidentally enter the wrong password multiple times or when we unintentionally try to ssh via the wrong port multiple times. The IP will be blocked for a certain period of time. If you have faced the same issue then read on to know how to block blacklisted IP addresses on a WHM based GNU/Linux server.

[SHELL-SCRIPT] A Linux Shell Script to create a folder with a specific name under all sub-directories of a parent folder

This is a script to create a particular directory under all subdirectories in a parent directory. Consider the case when a parent directory consists of more than 100 folders and you want create a new folder under all these directories, with the same name. Doing this manually would be a mess. This script would help you do this in no time.

These are the steps for executing the script:

Shell script to rename a specific-directory present under all sub-directories in a specified parent folder

December 31, 2012 - 16:58

The function of the script is to rename a specific-directory present under all sub-directories of a specified parent folder. Consider, you have a particular folder under all sub-directories of a folder and you want to rename all of those occurrences. Doing it manually would take much time. Here is a script to make it easy for you.

Simple steps to help you monitor and stay on top of all network troubleshooting efforts

Before we start counting the steps for troubleshooting, the first thing we have to do is, arrange networking components in a structured and systematic order. This will help us define the problem correctly and give us a clear idea about issues that happen regularly.

The few steps that are to be followed are:

How to access your website from your Linux machine when the site's domain name has expired but you remember the IP

The main purpose of a domain-name is to make the website simpler to access. It is easier for users to remember domain names rather than having to remember IP addresses of sites. But do you know that it would be quite useful to remember IPs when the domain name has expired? How would you access a site whose domain name has expired? Most people have no idea about this.

How to use getfacl and setfacl to get and set access control lists (ACLs) on directories in Linux

The command "setfacl" refers to Set File Access Control Lists and "getfacl" refers to Get File Access Control List. Each file and directory in a Linux filesystem is created with a specific set of file permissions for its access. Each user can have different set of file access permissions. The permissions can be set using the setfacl utility. In order to know the access permissions of a file or directory we use getfacl. The getfacl command displays the access permissions of files and directories with file name, owner, group and the ACL's(Access Control List). When we create a directory it is created with a default set of access permissions and by using getfacl we will be able to see the access rights.

How to backup/copy/synchronise a full folder lying on a remote server, onto another (local/remote) machine easily using rsync in linux

July 31, 2012 - 23:46

”rsync” is an open source utility in Linux/Unix primarily used for synchronising files/directories over the networks. You can also use it to backup/copy folders between machines. It is particularly made use of to while administering servers connected to the internet. The term “rsync” itself refers to “remote-synchronise”.

Untar without running into "Cannot change ownership to uid NNN, gid NNN: Disk quota exceeded" on WHM/cpanel VPS accounts

When you untar large tar files even as the root user on your VPS you might run into the error "Cannot change ownership to uid NNN, gid NNN: Disk quota exceeded". This is because the extracted files from the tar archive is being attempted to be created with the original UID and GID as on the system where the tar archive was created. Now if the UID is not already present on the new VPS or if the UID corresponds to a user without a lot of disc quota available the above error will be triggered preventing extraction of the tar.gz archive.

Script to find the name servers and A-records of multiple domains

Most of us must be familiar with the names 'dig' and 'whois'. If not, these are two commands used to find the details of domains. You just have to type in dig domainname or whois domainname to get a comprehensive set of info on the domain.

What if you have not just one or two domains to check about. How about a 1000 domains and you want to know the details of each?

[SOLVED] When trying to access the Repository tab in Redmine, the following error occurs: The entry or revision was not found in the repository

Redmine is one of the most popular Ruby on Rails applications which has made quite a name for itself in the world of Project Management. It offers a lot of flexibility. One of its main advantages is that it can recognize your files repository and can work along with your source control system to keep track of all changes through the tracker itself.

Here is one error that we came across when we tried to integrate our filesystem and source control management system with Redmine - Error: The entry or revision was not found in the repository

How to exclude directories when backing up a website using tar in Linux

Some times we wish to exclude some files and directories when we try to take backup of a website. With tar it is possible. Use the --exclude option. For example, if you want to exclude .git folder and the imagecache directory inside the files folder, use the command:

tar -zcvf --exclude ".git/*" --exclude ".git" --exclude "sites/default/files/imagecache/*" --exclude "sites/default/files/imagecache" public_html

The Linux Cron - Crontab and cron jobs - Why, What, How?

July 17, 2012 - 06:24

In every operating system, there are a lot of tasks that need to be scheduled to run at a particular time - some, very often (as in, every 5 minutes), and some, less (like, once every month).

For a quick example, you might want to run a temporary files deletion operation at midnight each day - this is where you need to write a cron job.

Crontab and Cron jobs are Linux’s version of a complete job scheduling system.

Let us see these in detail.

How to mirror the entire Ubuntu software repository locally and to create your own Ubuntu Repository DVDs

July 10, 2012 - 16:38

Unlike proprietary operating systems that comes up with a rudimentary set of applications, Ubuntu and GNU/Linux in general has thousands of freely available Free Software applications available for installation directly from the Internet. These applications are usually available from software archives referred to as repositories. The official Ubuntu repositories contain more than 30000 applications. Having the Ubuntu repositories on DVD can be useful for those users who don't have access to the Internet or has only limited connectivity from the machine where they have their Ubuntu installed but have access from somewhere else to download the repository. Here is a step by step instruction on how to download the complete Ubuntu repositories and build your own set of Ubuntu Repository DVDs. For those who would like to get it done the easy way you can buy a set of Ubuntu Repository DVDs via our RequestCD program

[SOLVED] How to fix "Unable to stat the mount point /media/cdrom/" while installing applications from repository CD/DVDs in Ubuntu 12.04

Ubuntu 12.04 comes with a bug that it will not mount the cdrom on proper path and that prevents installation of applications from the Ubuntu Repositories even if you add the repositories via apt-cdrom successfully.

Whenever you try to install applications you'll get an error message like

E: Unable to stat the mount point /media/cdrom/ - stat (2: No such file or directory)

Here is how to fix this problem: