System Administration - Tips, Guidelines, HowTo's

System Administration
close

on 26th February 2014 / by Thomas
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 Objective: This course will provide an hands on introduction to a set of server side applications. By completing the course the participants will be expected to setup a basic: Proxy Server SSH, SAMBA, Backup Web server Database server Print server Mail sever DNS Course Fee: Fee will be 10,000 per head. Infrastructure: One computer per person will be provided. Duration: The workshop will be conducted in in five days 6 hours on each day Date: March 1 – 5, 2014 Venue: Training Centre, Santhigiri, Pothancode. Material: The resource persons will be providing the soft copies of resource material for the training and subsequent learning Resource Person: The course will be handled by Praveen Arimbrathodiyil. He is a Free Software consultant by profession. He is also an established trainer, Debian developer, and RedHat Certified Engineer. He has worked as Senior System Administrator at RedHat handling engineering labs across the globe. He has also worked with Hewlett-Packard as technology consultant providing services to various organization in India and US). Workshop Contents: Day 1 Installation User Management and Permission system File System Hierarchy Package management Basic IP configuration and debugging Remote server administration - SSH Day 2 Boot loader configuration Shell scripting Automating common tasks Scheduling tasks with cron Day 3 File sharing with Samba and NFS Sharing Printer Sharing Internet - Proxy server Sharing internet - IP tables Firewall Day 4 DHCP DNS Web Server: Apache, Nginx Database server Proxy Server Day 5 Implementing a Mail Server RAID, LVM Virtualization: KVM Specific issues, troubleshooting and bug reporting There are only limited seats available. If you are interested in participating in the workshop do get in touch with Shanthigiri Ashram System Administration Training GNU Linux Zyxware Workshops Santhigiri Ashram Red Hat Leave a reply Your email address will not be published. Required fields are marker *
close

on 04th July 2013 / by sandeep.sasikumar
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. Before trying to solve the problem we have to check the following things to identify where we went wrong: Check whether the username and password you entered is correct Check whether your passwords have unnecessary spaces. Check the default ssh-port Now lets see how to remove the blocked IP from WHM Login to WHM with the username and password [The funny part about the initial step is that now you won't be able to log into WHM because your IP is blocked, so try from any another connection with a different IP :) ]. After logging in to WHM the next step is to find out the 'Plugins' option. In the 'Plugins' option select 'ConfigServer Security&Firewall' In this option you will see a list of different features and from this list note the feature titled 'Temporary allow/deny', under this you can see your IP address. To unblock your IP address simply remove that IP from the IP address field. Now try connecting with your IP address and you should be able to acess it:) Linux System Administration Server Administration WHM Network Security Web Security Leave a reply Your email address will not be published. Required fields are marker * Alaa (not verified) access_time 21 Feb 2019 - 16:05 Thanks for the info. Anonymous (not verified) access_time 21 Feb 2019 - 16:05 i am using putty but not working my ip. Anonymous (not verified) access_time 21 Feb 2019 - 16:05 This is just what i have been looking for long. Got most of my routers ip blacklisted on whm. I read the tute, logged in the vps and cleared them up. Thanks Michelle (not verified) access_time 21 Feb 2019 - 16:05 It seems this normally happens when you make a change to a website or email on a diffrerent i.p. Either way thanks for the help. Jeffery (not verified) access_time 21 Feb 2019 - 16:05 May I know how to remove our IP from the Gmail blacklist? I need to know the reason why I was blacklisted. Here is my blog maxautoglass.com and I need help to configure a static IP address from Windows 7. Add new comment
close

on 11th January 2013 / by sandeep.sasikumar
Here is a script to help you find empty directories located under a specified parent-folder. The file folders.txt contains the list of folders that are to be passed as input to the script. The script will now check all the folders mentioned in the file folders.txt, and give the list of folders that are empty. The output can either be seen at the terminal or it can be passed to a file via a redirector. Here is the code for the same: #!/bin/bash # Script to find empty directories # Read the name of folders from the folders.txt file # path to the folder #find . -type d -empty will find all empty directories path=/path/to/the/parent/folder while read folder do echo "$folder" cd $path/$folder empty=`find . -type d -empty` echo -e "$empty" done < folders.txt Linux System Administration Shell Scripting Leave a reply Your email address will not be published. Required fields are marker *
close

on 04th January 2013 / by sandeep.sasikumar
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: First, add the exact path where the parent directory is present, and the name of the folder that is to be created. Then, either pass the output of the 'ls' command as input to the script or pass the output of the 'ls' command to a text-file and pass this text-file as input to the script. Now, copy the following script code into a file and save it with a .sh file extension after making the necessary changes to suit your needs. Then run the script in terminal by typing './' infront of the name of the script. For example, if the name of the script is 'create-directory.sh', you can run the script by typing './create-directory.sh'. This will create the specific-directory for you. #!/bin/bash #Script to create a specific-directory on all subfolders in a parent-directory path=/path/to-the/parent/directory while read project do echo "$foldersname" cd $path/$foldername/ mkdir Folder-name-to-be-created done < foldername.txt Linux System Administration Shell Scripting Leave a reply Your email address will not be published. Required fields are marker *
close

on 31st December 2012 / by sandeep.sasikumar
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. The script takes the following inputs: 'path' is the absolute path of the parent folder, and 'foldername.txt' is a text file which contains the names of the subdirectories under each of which the specific directory has to be renamed. Now save the script with any name of your choice and run it from the terminal to see it do what it was made to do. :-) #!/bin/bash #Script to rename a specific-directory present under all sub-directories in a specified parent folder path=/path/to-the/parent/directory while read project do echo "$foldersname" cd $path/$foldername/ mv current-folder-name new-folder-name done < foldername.txt Linux System Administration Leave a reply Your email address will not be published. Required fields are marker *
close

on 23rd November 2012 / by sandeep.sasikumar
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: Number each and every system at your office. Number each connected router and switch in the network. Number each cable that connects devices to the switch, and also those cables from the switch to the router. Name them in a good way so as to identify the cable from the name itself. Check the performance of all PCs, wireless/wired routers, switches and the cables that connect each of these devices together. By pinging, check the connection between routers and switches and also between switches and PC's. Note down if any packet loss occurs. Check the RJ45 pins of each cable and re-crimp all defective cables. Write a script to check the network connection, with the following behaviour: Whenever there is a connection issue, the script writes the error message to a text document. The script will be set as a cronjob so that it will ping every minute to check the network connection. Make sure that the script is running on atleast one of the PC’s which are connected to each switch. Now you can see that everything is in a good ordered way. If any connection problem occurs you will be able to sort it out in much lesser the time than it took you before. The script to check the network connection would prove very useful as it will give you a clear idea of when and where the problem occurs. Hope this article helps you in your Network Troubleshooting efforts. Let me know if you have anything more to add to this. Thanks! Networking System Administration Network Troubleshooting Leave a reply Your email address will not be published. Required fields are marker *
close

on 23rd November 2012 / by sandeep.sasikumar
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. This article is here to help. Consider you have a site 'www.google.com' and its domain name google.com has expired. But you know the server's IP address as 74.125.236.134. If you want to access the site with that, from a Linux machine, use the following method for that: Add the following line to the file /etc/hosts: www.google.com 74.125.236.134Here, www.google.com is the domain name and 74.125.236.134 is its IP address. Now the site should be accessible via your machine's Web Browser. System Administration Linux Tips Domain Name Leave a reply Your email address will not be published. Required fields are marker *
close

on 16th November 2012 / by sandeep.sasikumar
If you own a website then there is a good chance that you are using cPanel. cPanel provides an graphical user interface to manage a Unix based web hosting account for everyone involved in it. If you want to know how to create a new cPanel account in WHM then continue reading. Follow the steps below to create a cPanel account Login to your WHM with the username and password. Click on the "Create a New Account" This will take you to a page where you have to enter the details of the Cpanel account you are planning to create. Enter the following details there. Domain information: You will have to enter the following details there Domain : Username : Password : Retype Password : Strength : Email : Package :Follow the steps below to select the package Choose a Package : Select Options Manually Settings: Choose the following there Cpanel Theme : Locale : Reseller settings DNS settings Mail Routing Settings After entering all the above data press the 'Create' button. Now you will have your Cpanel account. Linux System Administration Server Administration WHM cPanel Leave a reply Your email address will not be published. Required fields are marker *
close

on 19th October 2012 / by sandeep.sasikumar
This is a common question asked by many cPanel/WHM users. Linux shell access is demanded by most web developers due to its advantage over the normal cPanel interface. Steps to enable shell access for a normal cPanel/WHM setup are: Login into WHM with your username and password. Select 'Modify account' option from your WHM. Select the site for which shell access is to be enabled, from the list of domains and click on the 'Modify' button. Now you will be directed to another page where you have to tick the box corresponding to 'shell-access' and then click the 'Save' button at the bottom of the page. Now you will be again be redirected to another page where you will have some more options displayed, select an option that suits your needs and click ok. (I normally choose the first option - to create a seperate package for this). This should do the trick. Linux System Administration WHM cPanel Leave a reply Your email address will not be published. Required fields are marker *
close

on 12th October 2012 / by sandeep.sasikumar
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. What are the default access permissions for a newly created directory? To know this, first open a terminal and open the folder in which you want to create a subfolder. Next type "mkdir <folder-name>" and press the ENTER key. This will create a folder with default access permissions. To know the access permissions, type getfacl <folder-name> Now you will see the output of getfacl as something like the following: # file: file-name # owner: # group: user::rwx user:x:--- user:y:r-- group::r-- mask::rw- other::---Thus from the output of getfacl we will be able to see the access permissions of a file. In the above example, when we type getfacl <file-name> the output will be shown as in the above format. It displays the owner of the file, the group which has access to it and also its various users and their access rights. In the above case the users are x and y, where the user 'x' is having no permission on this file and therefore it is shown with --- symbol indicating no read/write/execute permissions for the user x. Now considering the other user 'y’, it is having the permission r-- which means read-only rights. The default umask is set to rw- (read/write permissions). How to copy the ACL of one folder to other? Consider an example of copying the ACL of the directory named "x" to "y". For this, firstly we should know the ACL of the directory named "x". To obtain this type the command getfacl x This will display the ACL of the directory named "x" in the above mentioned format: # file: x # owner: # group: user::rwx user:x:--- user:y:r-- group::r-- mask::rw- other::---To copy the ACL of one directory to the other we use the setfacl command. That is setfacl --setfile =- y As mentioned we want to copy the ACL of "x" to "y", for this we have to type the command getfacl x | setfacl -R –setfile = -y Here "getfacl x" will get the ACL of the directory named "x" and this output is given to the setfacl command using pipe. Thus getfacl will give the ACL of the directory "x" and setfacl -R –setfile = -y will set that ACL to the directory named "y". "-R" is used to set this ACL recursively. How to inherit the ACL of parent directory to its child? To copy the ACL of the parent directory to its child, use the following command getfacl . | setfacl -R --setfile = -subdirectory_name The "getfacl ." will get the ACL of the parent directory and setfacl will set that ACL to its sub-directories. Now for verification, type: getfacl subdirectory_name and also getfacl directory_name If both are same then the ACL of the sub-directory is same as the ACL of the parent. Linux System Administration Linux Shell Linux Terminal Security Leave a reply Your email address will not be published. Required fields are marker * ts (not verified) access_time 21 Feb 2019 - 13:19 The above command: getfacl x | setfacl -R –setfile = -y must reaad like this to work: getfacl x | setfacl -R –setfile=- y TS (not verified) access_time 21 Feb 2019 - 13:19 Forget about my previous post. This is the correct syntax now getfacl x | setfacl -R –set-file=- y anju rohilla (not verified) access_time 21 Feb 2019 - 13:19 when we run the command like this # setfacl -m u:anju:rw- /html where anju is a user and html is a file in /. then it changes the acess of the for group not for the user,why? Add new comment