XK0-005 · Question #744
A Linux administrator needs to harden a system and guarantee that the Postfix service will not run, even after a restart or system upgrade. Which of the following commands allows the administrator…
The correct answer is A. systemctl mask postfix.service. systemctl mask postfix.service is the correct command. Masking creates a symlink from the service unit file to /dev/null, which makes it completely impossible to start the service - manually, automatically at boot, or as a dependency of another service. This survives restarts…
Question
A Linux administrator needs to harden a system and guarantee that the Postfix service will not run, even after a restart or system upgrade. Which of the following commands allows the administrator to fulfill the requirement?
Options
- Asystemctl mask postfix.service
- Bsystemctl disable postfix.service
- Csystemctl stop postfix.service
- Dsystemctl -n restart postfix.service
How the community answered
(41 responses)- A71% (29)
- B17% (7)
- C5% (2)
- D7% (3)
Explanation
systemctl mask postfix.service is the correct command. Masking creates a symlink from the service unit file to /dev/null, which makes it completely impossible to start the service - manually, automatically at boot, or as a dependency of another service. This survives restarts and package upgrades. By contrast, 'disable' (B) only prevents automatic startup at boot but allows manual starts. 'stop' (C) only halts the currently running instance and does not persist. 'systemctl -n restart' (D) is not a valid flag combination for this purpose.
Topics
Community Discussion
No community discussion yet for this question.