[ norboten ]
rhcsa · lab rhcsa-05

The Server You Inherited

· about 90 minutes · runs on rocky-10 · unrated · timed: 90 minutes, pass line 70%

An unrated lab. It runs on your machine with no account and no network, and everything about it — the faults, the checks, the hints and the reference solution — is in the repository. An attempt on it is recorded on your profile and never moves a rating: only rated labs do. Rated and unrated labs.

The briefing

Exam simulation. 90 minutes. 15 tasks. Pass line 70%. The clock starts now.

You have inherited this server. Nobody knows the root password. Your own account's sudo was removed before the previous admin left. And the machine does not finish booting.

Reach it with k on this lab's screen (the serial console). To get to the bootloader, press b: it presses the machine's reset button and attaches to the console it boots on. The menu waits ten seconds.

Complete every task. Everything is graded after a reboot.

  1. The root password is Rhcsa-Lab5!.
  2. After you change it, every file keeps its correct SELinux context.
  3. The machine boots on its own, with the filesystem on /dev/vdb mounted at /data.
  4. The repository configured on this machine uses the local mirror at /opt/repos/local (no GPG checking is needed for it). No other repository is enabled.
  5. The package tree is installed.
  6. sysreport.service already exists. Its timer must run it every 15 minutes, starting at boot.
  7. A group auditors with GID 5000. Users maria (UID 5001) and sam (UID 5002) are members of it.
  8. maria's password must be changed at least every 90 days.
  9. sam exists for file ownership only: no interactive login is possible.
  10. Write /usr/local/bin/sysreport (Bash). It prints exactly three lines:
    hostname: <the short hostname>
    kernel: <the running kernel release>
    root_free: <free space on / as a whole percentage>%
    
    With -o FILE it writes those lines to FILE instead. Any other option prints an error to stderr and exits with status 2.
  11. The time service uses only the server 192.168.5.2.
  12. The system journal is kept across reboots.
  13. maria can ssh maria@localhost with a key, without a password prompt.
  14. /srv/audit belongs to group auditors; members can create files there, those files belong to auditors, and nobody else can enter it.
  15. Your own account is an administrator again — the standard way, through group membership.

What is graded

The machine is checked, rebooted, and checked again. A check passes only if it passes both times.

CheckObjective
01_root_password_setInterrupt the boot process to gain system access
02_shadow_context_correctRestore default file contexts
03_boots_with_data_mountedConfigure systems to mount file systems at boot by UUID or label
04_repo_uses_local_mirrorConfigure access to RPM repositories
05_tree_installedInstall and remove RPM software packages
06_sysreport_timer_every_15mSchedule tasks using at, cron, and systemd timer units
07_auditors_group_and_membersCreate, delete, and modify local groups and memberships
08_maria_password_agingChange passwords and adjust password aging
09_sam_cannot_log_inCreate, delete, and modify local user accounts
10_sysreport_scriptProcess script inputs ($1, $2, etc.)
11_chrony_uses_lab_serverConfigure time service clients
12_journal_persistentPreserve system journals
13_maria_ssh_key_loginConfigure key-based authentication for SSH
14_audit_dir_sharedDiagnose and correct file permission problems
15_you_are_an_admin_againConfigure privileged access

Start it

  1. 2Labs
  2. rhcsa-05select this one
  3. udownload it
  4. sstart the machine

Reading

Where the lab's hints send you, level by level, as you ask for them (h, then l opens a journal section in the TUI).

Theory for this lab

4 questions on the same topic, in the lab's Theory tab. They never affect the lab's grade. Three of them, to answer here:

Question 1

After resetting the root password from rd.break, why touch /.autorelabel before rebooting?

Question 2

Which repo file line points dnf at a local directory mirror?

Question 3

A timer unit contains `OnCalender=*:0/15`. What happens?