· 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.
A contractor account, kmorris, was created last week for the devops team. Since then:
/srv/project.
The rest of the team can see the directory but cannot write there either.sudo. kmorris is told
"not allowed".What the team expects, and what will be graded:
/srv/project./srv/project automatically belong to the devops group.sudo systemctl restart nginx.Everything must still hold after a reboot. You have root through sudo.
The machine is checked, rebooted, and checked again. A check passes only if it passes both times.
| Check | Objective |
|---|---|
| 01_contractor_in_devops | Create, delete, and modify local groups and memberships |
| 02_project_dir_shared | Diagnose and correct file permission problems |
| 03_new_files_get_team_group | Diagnose and correct file permission problems |
| 04_umask_allows_team_edits | Manage default file permissions |
| 05_sudo_restart_nginx | Configure privileged access |
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).
man 1 idman 8 usermodman 1 chmodman 8 pam_umaskman 5 sudoersman 8 sudo4 questions on the same topic, in the lab's Theory tab. They never affect the lab's grade. Three of them, to answer here:
What does `usermod -G devops kmorris` do if kmorris is currently in wheel and developers?
Replaces the supplementary groups: kmorris ends up in devops only
-G sets the complete supplementary group list. To add without removing, combine it with -a (usermod -aG devops kmorris). The primary group is -g.
man 8 usermod
A user was just added to a group. Why does their existing SSH session still not have access?
Group membership is read at login; the running session keeps its old groups
A process's supplementary groups are set when the session starts. Log in again (or use newgrp / sg for one shell). No reboot is needed.
man 1 newgrp · man 1 id
In a sudoers file, what does `%devops ALL=(root) /usr/bin/systemctl restart nginx` grant?
Members of group devops may run exactly that command as root, on any host
A leading % names a group; ALL is the host list; (root) the target user; then the allowed command with its arguments. Given arguments must match exactly.
man 5 sudoers