RHCSA Mock Exam 2

Full EX200-style exam on servera (RHEL 10), 20 tasks, 150 minutes. Exam rules: work as root (`sudo -i`) on servera; serverb is the file/SSH server and needs no changes. **Everything must survive a reboot**: the marking happens after the machine is restarted, so a change that only exists in memory (runtime firewall rule, setenforce, mount without fstab, service started but not enabled) scores nothing. Do not change the root password except in the task that asks for it, and do not disable SELinux. Scenario: `exam2` will host the WebAsha learning-content portal. The previous admin left SELinux permissive.

Tasks

  1. The root password of servera is unknown. Reset it to Portal2026 from the boot loader, and make sure root can log in afterwards with SELinux enforcing.
  2. Configure connection eth1 persistently: keep 172.25.250.10/24 and add 172.25.250.42/24, gateway 172.25.250.254, DNS 172.25.250.254, and the static IPv6 address fd00:250::42/64. Set the host name to exam2.lab.example.com.
  3. Configure servera to use the RPM repository at file:///opt/portal-repo (unsigned packages, enabled), and install the package webasha-portal from it.
  4. Add the system-wide Flatpak remote portalapps for file:///opt/portal-flatpak (not GPG-signed) and install the application com.webasha.Editor from it.
  5. Create group devteam (GID 5200); users arjun and meera with devteam as a supplementary group; user kabir with no interactive shell and not in devteam. All three passwords: Exam@2026. Members of devteam may run any command as root through sudo without a password.
  6. Passwords of all new users must expire after 45 days. Also make meera's current password expire after 45 days.
  7. Create /srv/devteam, owned by group devteam, so that only root and members of devteam can use it (full access) and new files in it automatically belong to devteam.
  8. Give arjun a default umask of 077 for login shells. Then set up key-based SSH so that student on servera can log in to serverb without a password.
  9. Save every line of /usr/share/dict/webasha-words that contains the string ware to /root/ware.txt, in their original order. Then create a bzip2-compressed tar archive /root/local.tar.bz2 of the directory /usr/local.
  10. Write the executable script /usr/local/bin/bigfiles.sh. Given a directory as its only argument, it prints the full paths of the regular files below it that are larger than 1 MiB, sorted. If the argument is missing or not a directory it prints a message containing Usage and exits with status 1.
  11. Run /usr/local/bin/bigfiles.sh /srv/media every day at 03:15 with systemd: create bigfiles.service and bigfiles.timer in /etc/systemd/system, and enable and start the timer.
  12. Make chronyd synchronise with classroom.lab.example.com (with iburst) instead of the default pool, enabled at boot, and set the time zone to Europe/London.
  13. Apply the tuning profile throughput-performance, with tuned enabled at boot. Also make the systemd journal persistent across reboots.
  14. Create volume group datavg on /dev/vdc with a physical extent size of 8 MiB. In it create logical volume datalv of exactly 60 extents, format it with xfs, and mount it on /data/app at boot (by UUID).
  15. The logical volume vgexam2/lvlogs mounted on /portal-logs is too small. Resize it and its file system to between 850 and 950 MiB without losing data.
  16. Create a 384 MiB partition on /dev/vdb and use it as swap, active now and at boot (by UUID). Do not touch any other swap.
  17. Mount serverb:/exports/shared on /mnt/content permanently with NFS. Configure autofs so that /learners/<user mounts serverb:/exports/homes/<user read-write on demand (for example /learners/student1); autofs must start at boot.
  18. The web server on servera is configured to serve /var/www/html on port 8909, but it does not work. Fix it without changing the Apache configuration or the port: curl http://servera:8909/ must return the page, httpd must start at boot, the port must be open in the firewall permanently, and SELinux must be enforcing (now and after reboot).
  19. Set the GRUB menu timeout to 12 seconds (regenerate the GRUB configuration), and add the kernel argument audit=1 persistently to all installed kernels.
  20. Reboot servera and make sure everything still works: the machine must come up normally (no emergency mode) and every task above must still be complete after the reboot.