Rhcsa Mock 7
Rhcsa Mock 7
========================================================================
*Important_Instructions:
Please read carefully.
hostname: monday.lab.example.com (172.25.250.10)
hostname: tuesday.lab.example.com (172.25.250.11)
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.
=========================================================================
==