RHCSA ExamsPreparationFInal
RHCSA ExamsPreparationFInal
IP ADDRESS = 172.25.250.10
NETMASK = 255.255.255.0
GATEWAY = 172.25.250.254
DNS = 172.25.250.254 (Auto Off)
Domain name = lab.example.com
hostname = servera.lab.example.com
[BaseOS]
name = BaseOS
baseurl = http://content.example.com/rhel8.0/x86_64/dvd/BaseOS
enabled = 1
gpgcheck = 0
[AppStream]
name = AppStream
baseurl = http://content.example.com/rhel8.0/x86_64/dvd/AppStream
enabled = 1
gpgcheck = 0
A web server running on non-standard port 82 is having issues serving content. Debug and
fix issues.
The web server on your system can server all the existing HTML files from
/var/www/html (NOTE: Do not make any changes to these files)
Web service should automatically start at boot time
(a)All new creating files for user natasha as -r-------- as default permission.
(b) All new creating directories for user natasha as dr-x------ as default permission.
Step 1 :
Step 2 : su - natasha
Step 3 : umask
Step 4 : mkdir dir1
Step 5 : ls -l ( o/p directory should have dr-x------ permissions)
Step 6 : touch file1
Step 7 : ls -l ( o/p file should have -r-------- permissions)
Step 8 : exit
Step 9 : extra
Step 10 : umask octal value permission
Step 11 : (0=rwx,1=rw-,2=r-x,3=r--,4=-wx,5=-w-,6=--x,7=---)
Step 2 : esc:wq
Configure a cron job that runs every day at 12:23 and executes:
Step 10 : timedatectl
while you are able to log in as any of the user ldapuser1 through ldapuser20, the only home
directory that is accessible from your system is ldapsuser2
Copy the file /etc/fstab to /var/tmp/ and configure the "ACL" as mentioned following.
The file /var/tmp/fstab should be owned by the "root".
The file /var/tmp/fstab should belong to the group "root".
The file /var/tmp/fstab should not be executable by anyone.
The user "natasha" should be able to read and write to the file.
14. LOCATE ALL FILES OWNED BY USER "HARRY " AND COPY
UNDER /ROOT/HARRY-FILES
Locate all files owned by user "harry " and copy it under /root/harry-files
Find a string 'ich' from " /usr/share/dict/words " and put it into /root/lines file
Or
Step 1 : tar -cJf /root/backup.tar.xz /usr/local (xz)
Or
Step 2 : tar -czf /root/backup.tar.gz /usr/local (gzip)
Step 1 : reboot
Step 2 : press e t kernel option (On Rescue Mode)
Step 3 : Type rd.break at last of the line which is start with
linux
Step 4 : Ctrl + x
Step 5 : mount -o remount,rw /sysroot
Step 6 : chroot /sysroot
Step 7 : passwd root
Step 8 : type passwd
Step 9 : touch /.autorelabel
Step 10 : ctrl + d (press twice)
[BaseOS]
name = BaseOS
baseurl= http://content.example.com/rhel8.0/x86_64/dvd/BaseOS
enabled = 1
gpgcheck = 0
[AppStream]
name = AppStream
baseurl = http://content.example.com/rhel8.0/x86_64/dvd/AppStream
enabled = 1
gpgcheck = 0
Step 1 : lsblk
Step 2 : fdisk /dev/vdb
Step 3 : p
Step 4 :
Step 5 :
Step 6 : press enter in first sector
Step 7 : enter size in last sector +512M
Step 8 : press t for assigning type in of partition
Step 9 : press 82 for swap
Step 10 :
Step 11 : lsblk (To check created partition)
Step 12 : partprobe /dev/vdb1
Step 13 : mkswap /dev/vdb1
Step 14 : swapon /dev/vdb1
Step 15 : blkid /dev/vdb1 >> /etc/fstab
Step 16 : vim /etc/fstab
UUID=0b9f9c46-35fb-49d5-9f59-8c2e40a6139d swap
swap 0 0(edit entry like this)
Step 17 : mount -a
Step 18 : lsblk (check partition added or not)
-swap 253:1 0 1.5G 0 part [SWAP]
Step 1 : df -h
Step 2 : lvdisplay
Step 3 : lsblk (check /mnt/database mount point disk)
Step 4 : lvextend -r -L 250M /dev/mapper-myvol-mylv
Or
Step 5 : resize2fs /dev/myvg/lv (if fstype is xfs then use
xfs_growfs [options] mountpoint)
Create the logical volume with the name "wshare" by using 50PE's from the volume group
"wgroup".
Consider each PE size of the volume group as "8 MB".
Mount it on /mnt/wshare with file system vfat.
UUID=0b9f9c46-35fb-49d5-9f59-8c2e40a6139d /mnt/wshare
vfat defaults 0 0(edit entry like this)
!/bin/bash
i then
]; then
else
GM/GN 4
fi