0% found this document useful (0 votes)
359 views

Rhcsa Mock 7

Uploaded by

gohelhitanshi002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
359 views

Rhcsa Mock 7

Uploaded by

gohelhitanshi002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

RHCSA9

========================================================================
*Important_Instructions:
Please read carefully.
hostname: monday.lab.example.com (172.25.250.10)
hostname: tuesday.lab.example.com (172.25.250.11)

You will be given by 2 VMs


Total number of Questions will be around 22
In one system root password is already set ( no need to reset ) but in second system
password need to be recovered.
● In your both system root passwd is "redhat"
● In one system Network configuration is required but in another one networking is already
done
● NTP need to be configured in only one system ( not in both )
● YUM Repo need to configured in both systems.
● Firewall and SELinux both will be pre-enabled.
========================================================================
Do this in monday
------------------------
#Q1. Configure network and set the static hostname.
IP ADDRESS
= 172.25.250.10
NETMASK
= 255.255.255.0
GATEWAY
= 172.25.250.254
DNS
= 172.25.250.254
Domain name = lab.example.com
hostname
= monday.lab.example.com
========================================================================
#Q2. Configure YUM repos with the given link ( 2 repos: 1st is Base and 2nd is AppStream )
● Base_url= http://content.example.com/rhel9.0/x86_64/dvd/BaseOS
● AppSterm_url= http://content.example.com/rhel9.0/x86_64/dvd/AppStream
========================================================================
#Q3. Debug SELinux:
● A web server running on non standard 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.
========================================================================
#Q4.
Create User accounts with supplementary group.
Create the group a named " accounting ".
Create users as named " Masha " and " Sasha ", will be the supplementary group
" accounting ".
Create a user as named " Maira ", should have non-interactive shell and it should be not
the member of " accounting ".
Password for all users should be " trootent "
========================================================================
#Q5. Configure a cron job that runs every 1 minutes and executes:
logger "EX200 in progress" as the user Masha .
========================================================================
#Q6. Create a collaborative Directory.

Create the Directory " /home/accounts " with the following characteristics.
Group ownership of "/home/accounts" should go to " accounting " group.
The directory should have full permission for all members of " accounting " group but not to
the other users except " root ".
● Files created in future under " /home/accountsr" should get the same group ownership .
========================================================================
#Q7. Configure NTP
● Synchronize time of your system with the server classroom.example.com .
========================================================================
#Q8. Configure AutoFS
classroom.example.com exports NFS share folder /rhome to your system
remoteuserX home directory is classroom.example.com:/rhome/remoteuserX on NFS share
remoteuserX home directory should be auto mounted locally beneath /rhome as
/rhome/remoteuserX when remoteuserX login into local system
home directories must be writable by their users
========================================================================
●#Q9. ACL.
● 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 any one.
● The user "Maira" should be able to read and write to the file.
● The user "Sasha" can neither read nor write to the file.
● Other users (future and current) should be able to read /var/tmp/fstab.
========================================================================
#Q10. Create user 'builder' with 1212 uid and set the password 'trootent'
========================================================================
#Q11. Locate all files owned by user " Sasha " and copy it under /root/Sasha-files
========================================================================
================================
#Q12. Find a string ending in ' ich' from " /usr/share/dict/words " and put it into /root/lines file.
========================================================================
#Q13. create an archive ' /root/backup.tar.bz2 ' of /usr/local directory and compress it with
bzip2.
========================================================================
#Q14. Create a Container
-> The container should be managed by already existing user Sasha.
-> Create a container file by name ContainerFile using following content
FROM registry.access.redhat.com/ubi8/ubi:latest
RUN dnf install -y python36
CMD ["/bin/bash", "-c", "sleep infinity"]

-> Create a Image named python36 using the file you just created.
-> Create a Container name python-svc using the pyhton36 image.

=======================================================================
#Q15 Manage Container
-> The Container python-svc should have a persistent storage as follows:
The Directory /opt/input from host should be mounted on /tmp inside the container
The Directory /opt/output from host should be mounted on /var/tmp inside the container
-> Verify the persistent storage by creating files.
-> Make sure you can manage your container using systemctl commands

======================================================================
#Q16 Create a Script
→ Create a script that finds all files from /usr who have sgid set, and it’s size is between 30k and 45k
→ The name of those files should be redirected to /root/usr-files .

========================================================================
#Q17 Manage the Default Permissions
→ Make sure that the file created by builder user should get 444 octal permissions.
→ Make sure that the dire created by builder user should get 555 octal permissions

Tuesday:
`````````
NOTE: In this Server 3 Disks will be given.
1. /dev/vda : for ROOT filesystem ( don't do anything under this Disk )
2. /dev/vdb : You need to use Swap and LVM Partition.
3. /dev/vdc : You need to use Swap and LVM Partition.
#Q18. Reset root user password and make it ' trootent '
========================================================================
#Q19. Configure YUM Repos
● Base_url= "http://content.example.com/rhel9.0/x86_64/dvd/BaseOS"
● AppStrem_url= "http://content.example.com/rhel9.0/x86_64/dvd/AppStream"
========================================================================
#Q20. Resize a logical Volume
- Resize the logical volume " Prod " so that after reboot the size should be in between 200MB
to 250MB .
========================================================================
#Q21. Add a swap partition of 512MB and mount it permanently.
========================================================================
#Q22. Create a logical Volume and mount it permanently.
Create the logical volume with the name " share-space " by using 45PE's from the volume
group " share-group ".
● Consider each PE size of the volume group as " 16 MB" .
● Mount it on /mnt/share with file system ext4 .

========================================================================
#Q23. Configure System Tuning:
● Choose the recommended 'tuned' profile for your system and set it as the default.
=========================================================================
==

You might also like