Professional Documents
Culture Documents
RedHat Certified System Administrator-7 (RHCSA) - Questions With Solution. ТАУ DevOpsAGE
RedHat Certified System Administrator-7 (RHCSA) - Questions With Solution. ТАУ DevOpsAGE
RedHat Certified System Administrator-7 (RHCSA) - Questions With Solution. ТАУ DevOpsAGE
– DevOpsAGE
In this blog, We will discuss the questions and its Solutions related to
the Redhat Certified System Administrator-7(RHCSA) (RHEL7 Q & A)
Examination. I’m writing this post, as I have already gone through this
examination and based on that questions, I thought of writing a post on it. You
can practice this on your Virtual machine and can appear for your
examination. Few things need to be kept under considerations.
Note/Caution: This blog has been written to show you the exam pattern and to give you Linux System
Administration understanding. DevOpsAGE Technologies does not guarantee the passing of RedHat
Certified System Administration Exam.
https://web.archive.org/web/20180926053149/http://www.devopsage.com/redhat-certified-system-administrator-7-rhcsa-questions-with-solution/ 1/12
12/06/2019 RedHat Certified System Administrator-7 (RHCSA)- Questions with Solution. – DevOpsAGE
Ethernet/Device = eth0
Hostname = serverX.example.com
IP address = 172.10.1.10
Netmask = 255.255.255.0
Default Gateway = 172.10.1.254
DNS search path = example.com
primary DNS server = 172.10.1.250
Prerequisite:
Step: 1 change the root password in your virtual machine using single user mode.
– No Marks for this activity.
Steps:-
https://web.archive.org/web/20180926053149/http://www.devopsage.com/redhat-certified-system-administrator-7-rhcsa-questions-with-solution/ 2/12
12/06/2019 RedHat Certified System Administrator-7 (RHCSA)- Questions with Solution. – DevOpsAGE
Questions:
Solution:
# cd /etc/yum.repos.d
# rm -rf *
# vim devopsage.repo
[devopsage]
name=yum-repo
baseurl=http://content.example.com/rhel7.0/x86_64/dvd
gpgcheck=0
enabled=1
:wq
========================================================================================
==========
Solutions:
# getenforce
enforcing
# vim /etc/selinux/config
SELINUX=enforcing
:wq!
# reboot
https://web.archive.org/web/20180926053149/http://www.devopsage.com/redhat-certified-system-administrator-7-rhcsa-questions-with-solution/ 3/12
12/06/2019 RedHat Certified System Administrator-7 (RHCSA)- Questions with Solution. – DevOpsAGE
========================================================================================
==========
Solution:
========================================================================================
=========
Qs-4. Create the “LVM” with the name “fedora” by using 100PE’s from the
volume group “redhat”. Consider the PE size as “8MB”. Mount it on /mnt/data
with filesystem xfs.
Note: In the exam, you should create an only extended partition, don’t create a primary
partition as 3 primary partitions already exist by default. So if you create a primary partition
you won’t be able to create a further partition.
Solution:
# fdisk -l
# fdisk /dev/vda (create a partition with "804M" & give hexa code as "8e" for linux LVM)
# partx -a /dev/vda (run this CMD twice)
(or)
# partprobe
# pvcreate /dev/vda4
# vgcreate -s 8M redhat /dev/vda4
# lvcreate -l 100 -n fedora redhat
# mkfs.xfs /dev/redhat/fedora
# blkid
# mkdir /mnt/date
# vim /etc/fstab
:wq
# mount -a
# df -h
========================================================================================
==========
Q5. Extend the lvm size to 250MB the location from “/dev/redhat/fedora”
without loosing any data.
Solution:
========================================================================================
==========
Qs-6. Extend the SWAP space with “512” MB don’t remove or extend the existing
swap. Your new Swap should be mounted at booting time also.
Solution:
# free -m
# fdisk -l
# fdisk /dev/vda // create a partition with 512M & give hexa code as 82
# partprobe
(or)
# partx -a /dev/vda // run this CMD twice
# mkswap /dev/vda5
# swapon /dev/vda5
# vim /etc/fstab
:wq
https://web.archive.org/web/20180926053149/http://www.devopsage.com/redhat-certified-system-administrator-7-rhcsa-questions-with-solution/ 5/12
12/06/2019 RedHat Certified System Administrator-7 (RHCSA)- Questions with Solution. – DevOpsAGE
# mount -a
# free -m
========================================================================================
==========
Solution:
# groupadd admin
# useradd -G admin harry
# useradd -G admin natasha
# useradd -s /sbin/nologin sarah
# passwd harry
# passwd natasha
# passwd sarah
OR
========================================================================================
==========
Files created under “/home/admin” should get the same group ownership is
set to the “sysadmin” group.
# mkdir /home/admin
# chgrp sysadmin /home/admin
# chmod 2770 /home/admin
# ls -ld /home/admin
========================================================================================
==========
Qs-9. The user sarah must configure a cron job that runs daily at 14:23 every day.
and executes “/bin/echo “Welcome to the world of Linux”.
:wq
========================================================================================
==========
Qs-10. Copy the file /etc/fstab to /var/tmp and configure the “ACL” as mention
following.
The user “natasha” can neither read nor write to the file. other users (future and
current) shuold be able to read /var/tmp/fstab.
https://web.archive.org/web/20180926053149/http://www.devopsage.com/redhat-certified-system-administrator-7-rhcsa-questions-with-solution/ 7/12
12/06/2019 RedHat Certified System Administrator-7 (RHCSA)- Questions with Solution. – DevOpsAGE
# cp /etc/fstab /var/tmp
# setfacl -m u:sarah:rw- /var/tmp/fstab
# setfacl -m u:natasha:--- /var/tmp/fstab
# getfacl /var/tmp/fstab
========================================================================================
==========
Qs-11. Create the user “jein” with uid 4332 with password “wakennym”.
========================================================================================
==========
Qs-12. locate the files of owner “harry” and copy to the location /root/result
directory. Also preserve the permission, ownership and time stamp.
# mkdir /root/result
# find / -user harry -exec cp -rvfp {} /root/result/ \;
# cd /root/result
# ls -lrt
========================================================================================
=========
Qs-13. Find the string “squid” from “/usr/share/dict/words” file and copy the
lines in /root/lists.txt.
========================================================================================
=========
https://web.archive.org/web/20180926053149/http://www.devopsage.com/redhat-certified-system-administrator-7-rhcsa-questions-with-solution/ 8/12
12/06/2019 RedHat Certified System Administrator-7 (RHCSA)- Questions with Solution. – DevOpsAGE
Click Apply
Provide the proper entries which are mention in the question paper & Click Apply
========================================================================================
=========
========================================================================================
==========
# vim /etc/chrony.conf
// comment the above servers then write below as it is
serverX classroom.example.com iburst
:wq!
# systemctl restart chronyd.service
# systemctl enable chronyd.service
# chronyc sources -v
# timedatectl
========================================================================================
========
Also, Please comment on the post with your views and let us know if any
changes need to be done.
https://web.archive.org/web/20180926053149/http://www.devopsage.com/redhat-certified-system-administrator-7-rhcsa-questions-with-solution/ 10/12
12/06/2019 RedHat Certified System Administrator-7 (RHCSA)- Questions with Solution. – DevOpsAGE
Thanks!!
Category: Linux Shell Script Tags: Redhat certified system administrator , RHCSA , RHCSA
Dumps
Rich Davis
August 20, 2018
Couple of corrections :-
“The directory should have read, write & access permission for all members…..”
“The directory should have read, write & EXECUTE permission for all members…..”
# vim /etc/chrony.conf
// comment the above servers then write below as it is
serverX classroom.example.com iburst
:wq!
# vim /etc/chrony.conf
// comment the above servers then write below as it is
https://web.archive.org/web/20180926053149/http://www.devopsage.com/redhat-certified-system-administrator-7-rhcsa-questions-with-solution/ 11/12
12/06/2019 RedHat Certified System Administrator-7 (RHCSA)- Questions with Solution. – DevOpsAGE
Thanks Rich for Valuable comment, I will recheck and make changes accordingly.
Hillary
June 10, 2018
Extremely educative contents. I am preparing for RHCSA exams and i found the article
very elaborative. Share more Please. Thanks and keep it up.
Thanks Hillary, I’m Glad that you liked it. I will keep on updating the posts on Linux,
DevOps, cloud and more!!
https://web.archive.org/web/20180926053149/http://www.devopsage.com/redhat-certified-system-administrator-7-rhcsa-questions-with-solution/ 12/12