Author: Rahul

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

What is Checken/Egg Problem. Chicken/Egg problem occurred in booting process of Linux. A Linux kernel required modules to mount root partition which typically uses ext3 file system, LVM, RAID, etc. All the Linux modules resides in /var/lib/($uname -r) directory but Linux kernel could not access them without mounting it. So the problem was that how Linux kernel access modules required to mount root partition. How Linux Kernel Get it Solve The grub boot loader and Linux kernel works together to get solve this problem using Initial Ram Disk ( initrd ), which is part of GRUB specification for a Linux…

Read More

.htaccess stands for “hypertext access”. This is the default Apache directory level configuration file. .htaccess can be used to secure a particular directories in web server. One of the most common uses is to require user authentication in order to serve certain web pages. Create .htaccess File. First create a .htaccess file in your website document root to protect entire site or in specific directory and add following content. AuthType Basic AuthName “Secure Content” AuthUserFile /home/myuser/public_html/.htpasswd require valid-user AuthType: defines the type of authentication. Basic means there is no encryption and the password hash is sent as clear text. AuthName:…

Read More

While working with Linux systems we preferred crontab for scheduling jobs generally. There are another utility at command is very useful for scheduling one time tasks. It reads commands from standard input or script/file which can be executed later once. But we can’t use at command for any recurring tasks. For recurring tasks use Linux crontab. Read This => Schedule recurring tasks with crontab on Linux At command can be useful for shutdown system at the specified time, Taking a one-time backup, sending email as a reminder at the specified time etc. This article will help you to understand the…

Read More

The “find” command is present in most Unix-like operating systems. It is used to locate and manipulate files and directories based on certain criteria, i.e., find files/directories based on date, size, groups, file types, and other criteria. It will look for files/directories in the current directory unless specified otherwise. The “find” is recursive, which means that it searches for files in the specified directory as well as the subdirectories of the specified directory. It can even be combined with some options to perform specific actions. This post will focus on how to use the “find” command to locate and manipulate…

Read More

Its a good practice to enable email alerts in your keepalived configuration. By using this keepalived service will always inform users whenever server switches from master to slave or slave to master for each VRRP instance. Below steps will help you to how to enable email alerts in Keepalived. Steps to enable email alerts: Step 1: Edit keepalived configuration file. # /etc/keepalived/keepalived.conf Step 2: Add below entry in global settings. global_defs { notification_email { [email protected] } notification_email_from [email protected] smtp_server mail.tecadmin.net smtp_connect_timeout 30 # …… Other configuration here ……. } Step 3: Add smtp_alert in each VRRP instances. vrrp_instance VI_1 {…

Read More

HTTPD (Hypertext Transfer Protocal Deamon) is a web server widely used with CentOS and Redhat Linux.It serves the webpages on clients requests. It is developed by Apache foundation. HTTPD is very easy in install and configure. Installing httpd using yum. # yum install httpd Default httpd basic configuration are as following. Configuration file: /etc/httpd/conf/httpd.conf Port: 80 Document root: /var/www/html Log file location: /var/log/httpd Setup virtual host in httpd configuration file Append below setting in httpd configuration file <VirtualHost *:80> ServerName www.tecadmin.net ServerAdmin [email protected] DocumentRoot /var/www/html </VirtualHost> Start httpd service # service httpd start Confugure httpd to start on system boot.…

Read More

This tutorial will help you to under the Sticky bit, SUID and SGID file permissions under Linux system. What is Sticky Bit? The sticky bit is used to indicate special permissions for files and directories. If a directory with sticky bit enabled will restrict deletion of the file inside it. It can be removed by the root, owner of the file or who have to write permission on it. This is useful for publically accessible directories like /tmp. Here is the implementation of Sticky bit on file on Linux system. Method 1: chmod +t tecadmin.txt ls -l tecadmin.txt -rw-r–r-T 1…

Read More

A shell is a command line interpreter. Its a special program which takes input from standard input devices, convert it to machine language and send to OS. After processing by OS, send result back to shell. Shell again translate it to human readable format and send results to output devices. Linux Shells: Bash Shell ( Born Again Shell ) : This is most common shell used by linux now a days. Bash sell is developed by Sir Brian Fox and Chet Ramey. CSH ( C Shell ) : The C shell’s syntax and usage are very similar to the C…

Read More

Ext3 and Ext4 filesystem includes support of ACLs on files and directories. ACL provides more control permissions on file than standard three access categories (owner, group and other ). Using ACL you can provide permission to specific user or group to file. Before working on ACL make sure that ACL is enabled on mounted file system. You can enable it during mounting filesystem with ACL option. Use following command Check if ACL is enabled on filesystem or not. # mount /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw,noatime,acl) Enable ACL by remounting file system using following command. # mount -o remount,acl /…

Read More

A Linux consider everything a file including hardware devices, printers, directories, and processes. Any text, music, video, image or any multimedia file is considered a regular file. All the regular file contains metadata about the file which describe everything about the file like, type, Inode etc. An inode is an entry in Inode table, containing information (the metadata) about a regular file and directory. An inode is a data structure on a traditional Unix-style file system such as Ext3 or Ext4. What is inode number in Linux Inode number also called index number, it consists following attributes of any file:…

Read More