Posts

Showing posts from December, 2019

Disk Management (1) - RHCSA

Image
Disk management is a main task for system administrator. So first identify what are the main hard disk types available in a system. SATA Hard Drives SCSI Hard Drives IDE Hard Drives Virtual Hard Disks    How Linux identify HDD ? They use prefixes named sd , hd , vd for identifying SATA / SCSI , IDE , Virtual Disks.  sd - SATA or SCSI hd - IDE vd - Virtual Disks EXAMPLE: If we use several SATA or SCSI disks in our system, system will identify them as sda , sdb , sdc and so on. If we use several IDE disks in our system, system will identify them as hda , hdb , hdc and so on. If we use several virtual disks in our system, system will identify them as vda , vdb , vdc and so on. For more clarification, Hard Disk Partitioning     There are many reasons to partition a hard disk. Security Easy to get backups Organization is easy  Speed   In hard disk partitioning, there are three (3)  types. Primary...

Security-Enhanced Linux (SELinux) - (3)

Image
So We are entering the last session of SELinux in RHCSA level. So before entering you have to remember followings. Installing a service yum install httpd systemctl enable httpd.service systemctl start httpd.service systemctl status httpd  rpm -qa | grep httpd SELinux mode sestatus vim /etc/sysconfig/selinux  reboot After installing httpd service, open firefox and type localhost. Then Welcome page will be loaded. Root directory is /var/www/html . In here you need to create a file named index.html. You can use touch or vim commands. For an example, cd /var/www/html vim index.html Then you will get a index.html file to edit. Reason for selecting /var/www/html file path because it was defined as the root directory in /etc/httpd/conf/httpd.conf path After you creating a index.html file save it and restart the httpd service. systemctl restart httpd.service --------------------------------------------------------------------------------------...

Interrupt the kernel to change the fstab - RHCSA

Image
What is fstab?  fstab is a file, used enter information about partitions with options. Such as if we want to persistently mount hard disk we add its uuid and file type to fstab. When boot-up process, fstab is read. fstab is in /etc/fstab  You can view it using vim text editor. vim /etc/fstab . Then you will receive following.   If there is an error, boot-up process will be stucked at some point. Then we need to enter the emergency mode.  First Create a partition. Use following steps. I am going too use vdb disk. cat /proc/partitions   fdisk /dev/vdb press n (or m for help) create 100M partition mkfs.ext4 /dev/vdb1 -->Format it using ext4.file system. blkid --> check whether block id is available mkdir /mountPoint ---> create a mount point echo | blkid | grep vdb1 >> /etc/fstab vim /etc/fstab and add uuid , file system , defaults , 0 0    press ESC and type :wq mount -a Reboot the system vim /etc/fstab...

Controlling the boot process - RHCSA

Image
In this chapter we are going to teach about how to interrupt the kernel and break the current password. Why break the password? When current password is lost, we use this mechanism to change root password and log in to the system. Simply we override the current password . If you have sudo privilege, log with another user and change the password. We have several ways to do this. Use live cd - Mount the root file system and edit /etc/shadow file Interrupt the kernal  Interrupt the kernel to break the password Use the following steps.  Reboot the computer While restarting press e to interrupt the kernal After that you need to find a line which was started with "linux". After moving the cursor to that line press END key to go to the end of the line. Then you can delete up to vcconsole.keymap=us . (do not delete it) . There are two letters ro . you need to change it as rw . Simply read only to read write.  Then add rd.break after deleting u...