RHCSA EX200 Latest Exam Questions with solutions | TechArticles

Red Hat Certified System Administrator Latest RHCSA EX200 Exam Questions with solutions based on RHELv8 and RHELv9


 Part-1 Please perform this activity on Server-1 (servera)

Q1. Configure network and set the static hostname.

IP ADDRESS = NETMASK = GATEWAY = DNS = Domain name = lab.example.com hostname = servera.lab.example.com

# vi /etc/sysconfig/network-scripts/ifcfg-eth0

modify the IP address then save and quit ( :wq)

#hostnamectl set-hostname servera.lab.example.com
# nmcli con up System \eth0
# systemctl restart NetworkManager

Q2. Configure YUM repos with the given link ( 2 repos: 1st is Base and 2nd is AppStream )

Base_url= http://content.example.com/rhel8.0/x86_64/dvd/BaseOS
AppSterm_url= http://content.example.com/rhel8.0/x86_64/dvd/AppStream

# vim /etc/yum.repos.d/local.repo
      name=yum repository local
      name=yum repository local

Save the file and exit (:wq)

# yum repolist
# yum update

Q3. Debug SELinux:

A web server running on nonstandard port 82 is having issues serving content. Debug and fix the 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.

# semanage fcontext -a -t httpd_sys_content_t "/var/www/html(/.*)?"
# restorecon -Rv /var/www/html
# semanage port -l | grep http
# semanage port -a -t http_port_t -p tcp 82
# firewall-cmd --permanent --add-port=82/tcp
# firewall-cmd --reload

Q4. Create User accounts with supplementary group.

Create the group a named "sysadms".

# groupadd sysadms

Create users as named "natasha" and "harry", will be the supplementary group "sysadms".

# useradd  -G sysadms harry
# useradd -G sysadms natasha

Verify the created user and its supplementary group

# id harry
# id nathasa

Create a user as named "sarah", should have non-interactive shell and it should be not the member of "sysadms".

# useradd -s /sbin/nologin sarah

Verify the created user and its non-interactive shell

# id sarah

Password for all users should be "trootent"

# passwd sarah
# passwd harry
# passwd natasha

Check all user accounts in the system

# cat /etc/passwd

Q5. Configure a task: plan to run echo "file" command at 14:23 every day.
# su - natasha
      $ crontab -e
      23 14 * * * /bin/echo "file"
      $ crontab -l
Q6. Create a Collaborative Directory

● Create the Directory "/home/manager" with the following characteristics.

● Group ownership of "/home/manager" should go to "sysadms" group.

● The directory should have full permission for all members of "sysadms" group but not to the other users except "root".

● Files created in future under "/home/manager" should get the same group ownership .

- Create the Directory "/home/manager" 
# mkdir /home/manager
- Change the group ownership of "/home/manager" to "sysadms" group
# chgrp sysadms /home/manager
- Set full permission for all members of "sysadms" group and not to other users except "root"
# chmod 2770 /home/manager
- Verify the permissions on the "/home/manager" directory
# ls -ld /home/manager
Q7. Configure NTP:

● Synchronize time of your system with the server classroom.example.com.

# yum install -y chrony
# vi /etc/chrony.conf : server classroom.example.com iburst
# timedatectl set-ntp true
# systemctl restart chronyd
# chronyc sources -v

Q8. Configure AutoFS

All Ldapuser2 home directory is exported via NFS, which is available on classroom.example.com ( and your NFS-exports directory is /home/guests for Ldapuser2, Ldapuser2's home directory is classroom.example.com:/home/guests/ldapuse2, Ldapuser2's home directory should be automount autofs service, Home directories must be writable by their users, 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.

# yum install -y autofs
# vi /etc/auto.master.d
        (/home/guests   /etc/auto.home)
# vi /etc/auto.home
        (* -rw,sync,fstype=nfs4 classroom.example.com:/home/guests/&)
# systemctl enable autofs.service
# systemctl start autofs.service
# ssh ldapuser5@localhost
# cd
# pwd

It should be /home/guests/ldapuser2

Q9. Configure ACL for the file /var/tmp/fstab

Copy the /etc/fstab file to /var/tmp/

# cp -rv /etc/fstab /var/tmp/

Check the ownership and permission of the file /var/tmp/fstab

# cd /var/tmp/
# ls -al /var/tmp/fstab

Set ACL for the file /var/tmp/fstab

# setfacl -m u:sarah:rw- /var/tmp/fstab
# setfacl -m u:harry:--- /var/tmp/fstab
# setfacl -m o:r-- /var/tmp/fstab

Check the ACL status of the file /var/tmp/fstab

# getfacl /var/tmp/fstab
Q10. Create user 'bob' with 2112 uid and set the password 'trootent'
# useradd -u 2112 bob
# passwd bob (trootent)
# id bob
Q11. Locate all files owned by user "harry" and copy it under /root/harry-files
# find / -user harry -exec cp -rvpf {} /root/harry-files \; 2>/dev/null
Q12. Find a string 'ich' from "/usr/share/dict/words" and put it into /root/lines file
# grep “ich” /usr/share/dict/words > /root/lines
# cat /root/line_file
Q13. create an archivie '/root/backup.tar.bz2' of /usr/local directory and compress it with gzip.
# tar -cvzf /root/backup.tar.bz2 /usr/local
For Server-2 Configuration Click Here
Please post a comment if you have any doubt


I love keeping up with the latest tech trends and emerging technologies like Linux, Azure, AWS, GCP, and other cutting-edge systems. With experience working with various technology tools and platforms, I enjoy sharing my knowledge through writing. I have a talent for simplifying complex technical concepts to make my articles accessible to all readers. Always looking for fresh ideas, I enjoy the challenge of presenting technical information in engaging ways. My ultimate aim is to help readers stay informed and empowered on their tech journeys.

Post a Comment

Previous Post Next Post

Contact Form