Hello World
First touch of the validator. Demonstrates the 4 check types: file_content, command_output, service_status, lynis_diff.
Validator tour
Welcome — how the validator works
This short intro module shows you how the lab checks your solutions. Every task is automatically validated on your real VM — you get instant feedback whether it passed. There are four kinds of checks, all of which you meet here once:
- File content (file_content): checks whether a file contains a certain text.
- Command output (command_output): runs a command and checks its output.
- Service status (service_status): checks whether a system service is running.
- Lynis score (lynis_diff): measures whether your system's security score improved.
This way you know exactly what "Check" means in all later modules. Click Check after each task.
Your goal
You solve one task per check type and see how the automatic validation works.
Exercises
1. File content check
Check type 1: file content. This check verifies whether a file contains a certain text. Write
Lab Sessioninto the file/etc/issue(the login banner).echo "Lab Session" | sudo tee /etc/issueCheck:
/etc/issuecontains the textLab Session.2. Command output check
Check type 2: command output. This check runs a command and verifies its output. Enable the UFW firewall so that
ufw statusreturns the textStatus: active.sudo ufw --force enable sudo ufw statusCheck:
ufw statusoutputsStatus: active.3. Service status check
Check type 3: service status. This check verifies whether a system service is running. Start the
fail2banservice.sudo systemctl enable --now fail2banCheck: the
fail2banservice isactive(systemctl is-active fail2ban).4. Lynis score diff
Check type 4: Lynis score. Lynis is a security audit tool that gives your system a hardening score. This check measures whether the score improved over the start — thanks to the measures in the previous tasks (firewall, fail2ban).
Run the audit:
sudo lynis audit system --quietSince you enabled UFW and fail2ban, the score should have risen.
Check: the Lynis hardening score improved over the baseline.
Now practice it yourself
Reading is good – doing is better. Start this course on a real Linux VM, right in your browser. A free account is all it takes.
Start for freeLab content under CC BY 4.0 – free to use with attribution (© TechLogia).
