XK0-006 practice question on Hardening, 2026-11-16
Archived question for 2026-11-16. Domain: Security. Objective 3.3: Hardening. Original SecLern question, written for practice.
Which command should an administrator use to edit /etc/sudoers so that syntax is checked before the file is saved?
Show the explanation
visudo locks the file, edits a copy and checks its syntax before installing it.
Each option
- A. sudoedit edits files as the invoking user through sudo and does not check sudoers syntax. It would be right for editing any other file.
- B. -l lists what the user may run. It would be right for reviewing privileges.
- C (correct). Correct: visudo locks the file, edits a copy and checks its syntax before installing it.
- D. vipw edits the account files. It would be right for /etc/passwd.
What this question tests
It maps to XK0-006 objective 3.3, Hardening: OS hardening and sudo Related ideas: visudo.
The published topics under this objective, so you can check what you have covered:
- sudoers
- SSH hardening
- Kernel and sysctl
More from the archive
- 2026-11-12: Which command lists ufw rules with numbers so that one can be deleted by number?
- 2026-11-13: A pipeline file has these jobs. ``` stages: - build - test - deploy deploy-job: stage: deploy script: - ./deploy.sh test-job: stage: test script: - make test build-job: stage: build script: - make ``` In which order do the jobs run, and what happens when test-job fails?
- 2026-11-14: An administrator wants the audit system to record writes and attribute changes to /etc/passwd, tagged with the key identity-file, until the next reboot. Which command does this?
- 2026-11-15: Which command runs an nginx container in the background and publishes host port 8080 to container port 80?
- 2026-11-17: An administrator will enable ufw on a server reached over ssh. Which order avoids losing the session?
Start a daily session
Several questions at a time, aimed at your gaps.