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..

Hi Guys, If you want to add a line in file at specific line number through script. Below examples will help you to do it. For example you have a file named file1.txt, file content are as below. [email protected]:~ # cat file1.txt tecadmin 1 tecadmin 2 tecadmin 4 Now you required to add text “tecadmin 3” at line number 3, use below command [email protected]:~ # sed ‘3itecadmin 3’ file1.txt > file1.txt.tmp Above command will create a new file file1.txt.tmp with expected output [email protected]:~ # cat file1.txt.tmp tecadmin 1 tecadmin 2 tecadmin 3 tecadmin 4 Replace origin file with tmp file…

Read More

Being a system administration you have all responsibilies to maintain your systems. System admin is a person having good knowledge about operating systems and applications, as well as hardware and software troubleshooting. Many of reponsibilies vary from organization to organization. Basic responsibilities of system administrator’s typically include: 1. User account management. Creating new users and groups. Configure security policies. Changing user password on regular interval. Analyze user security pocily on regular time interval. 2. Data backup and recovery. A good system admin always have data backup policy with him, Also have recovery policy. Check day to day your backups are…

Read More

Being a system administrator, we always need to keep our systems up to date with latest packages. Its difficult to go to server daily and check for available packages. For the same we can use yum-updatesd service to get email notifications to our mailbox or we can also configure this service to update any packages automatically when available. Yum-updatesd can be configured with few easy steps given below. You may also need to install top yum repositories provided latest packages. Step 1: Install/Update yum-updatesd Package By default this package installed on system installation time. So should just update this package…

Read More

As a system administrator, you need to take backup on daily basis. Backups are very useful to recover data from any crashes or corruption. I have written a simple script to take database backup from MySQL server and upload to FTP server. Being a system administrator, I recommend keeping a remote copy of your every backup. You can also try our new advance script for MySQL databases backup and upload to remote locations. Create a shell script file and copy the below script. Then update all the required values and execute.

Setup Details – Edit the above script for…

Read More

Security of data and server from hackers is a main task of system administration services. Below is few basic security tips for your linux server. 1: Strong Password Policy Making strong passwords is first stage of securing your server. Do not use common names as your password like yourname, date of birth, mobile number etc. Passwords should be alphanumeric with upper and lower case letters. You can use password aging policy on your linux machine to enforce users to change there password on regular interval. Example: To get password aging information # chage -l username To change password aging information…

Read More

Q. How to reset MySQL root password in Linux? How do I recover MySQL root password? I forgot MySQL root password, steps to change MySQL root password? How to reset MySQL root password using the command line. How to reset forgotten MySQL root password on Linux? How to reset MySQL 5.7 root password? MySQL is an open source database software widely used for data storage. Sometimes we forgot MySQL root password. So don’t be panic, This tutorial will help you to reset MySQL root password with simple steps. Reset MySQL Root Password Start MySQL in Safemode – First of all,…

Read More

MySQL is an relations database management system used for storing data in tabular format. If you are using MySQL server for an production use, then its necessary to create database backup for recovering from any crash. MySQL provides an utility mysqldump for taking backups. In this article you will learn, to taken databases backup in .sql format for archive format. Also we will explain various options for it. This tutorial uses mysqldump command to backup mysql databases. The second is default mysql command for restoring databases from backup. Backup MySQL Databases with mysqldump You have many options for creating databases…

Read More

FreeRadius is an implementation of RADIUS server. Its support multiple types of authentication. This article will help you to setup freeradius authentication with OpenLDAP. Step 1: Setup OpenLDAP Server First its required to setup openldap server to complete below setup. Use below link to install it. Setup Openldap Server on CentOS, RHEL System Step 2: Install freeradius Packages Install all freeradius2 server packages on your system using following command. # yum install freeradius2 freeradius2-utils freeradius2-ldap Step 3: Download Schema File Download radius ldap schema file and copy to ldap schema directory using below commands. 3.1 Download File # wget http://open.rhx.it/phamm/schema/radius.schema…

Read More

OpenLDAP is an opensource implementation of Lightweight Directory Access Protocal. Read more about OpenLDAP Project. I am using CentOS 5 for configuring OpenLDAP server. Below are the steps which I have performed during configuration. This article will help you step by step to Install and Configure OpenLDAP Server. Network Details: Below is the network details used while writing this article. System name: openldap.example.com System IP: 192.168.10.50 Domain Name: example.com Step 1: Create Test Accounts Firsty create two test user accounts in your linux system using following commnands. # useradd ldapuser1 # useradd ldapuser2 # passwd ldapuser1 # passwd ldapuser2 Step…

Read More

MySQL is a very flexible, open source relation database management system. Its support a very large number of applications. Features: >>   MySQL is a opensource database server. >>   Freely available to use. >>    Supports a large number of platforms. >>    Default port uses 3306. >>    Uses Stored procedures and Triggers for high productivity.

Read More