[ norboten ]
rhcsa · lab rhcsa-01

The Contractor Who Cannot Write

· about 25 minutes · runs on rocky-10 · unrated

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

A contractor account, kmorris, was created last week for the devops team. Since then:

  • kmorris cannot create or change anything in the team's shared directory, /srv/project. The rest of the team can see the directory but cannot write there either.
  • When kmorris does manage to create a file somewhere, nobody else on the team can open it.
  • Team members are supposed to be able to restart nginx with sudo. kmorris is told "not allowed".
  • Someone noticed kmorris can see a few files that belong to other teams.

What the team expects, and what will be graded:

  1. kmorris is a member of devops — and of no other team.
  2. Every devops member can create and edit files in /srv/project.
  3. Files created in /srv/project automatically belong to the devops group.
  4. Files kmorris creates can be read and edited by the rest of the group, every time kmorris logs in.
  5. devops members can run sudo systemctl restart nginx.

Everything must still hold after a reboot. You have root through sudo.

What is graded

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

CheckObjective
01_contractor_in_devopsCreate, delete, and modify local groups and memberships
02_project_dir_sharedDiagnose and correct file permission problems
03_new_files_get_team_groupDiagnose and correct file permission problems
04_umask_allows_team_editsManage default file permissions
05_sudo_restart_nginxConfigure privileged access

Start it

  1. 2Labs
  2. rhcsa-01select 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

What does `usermod -G devops kmorris` do if kmorris is currently in wheel and developers?

Question 2

A user was just added to a group. Why does their existing SSH session still not have access?

Question 3

In a sudoers file, what does `%devops ALL=(root) /usr/bin/systemctl restart nginx` grant?