nerdexam
CompTIACompTIA

XK0-005 · Question #682

XK0-005 Question #682: Real Exam Question with Answer & Explanation

The correct answer is A: In the [Service] section of the webserver.service file, add User=comptia.. Adding User=comptia in the [Service] section ensures that the web server runs as a non-root user, which enhances security by reducing the risk of elevated privileges being exploited. This follows the principle of least privilege, a best practice for system services.

Security

Question

A security team discovers that a web server has been running with elevated privileges and identifies it as a security violation. Which of the following items needs to be added to the webserver.service file to remediate the issue?

Options

  • AIn the [Service] section of the webserver.service file, add User=comptia.
  • BIn the [Unit] section of the webserver.service file, add AllowIsolate=true.
  • CIn the [Install] section of the webserver.service file, add WantedBy=single.target.
  • DAdd After=network.target to the [Install] section of the webserver.service file.

Explanation

Adding User=comptia in the [Service] section ensures that the web server runs as a non-root user, which enhances security by reducing the risk of elevated privileges being exploited. This follows the principle of least privilege, a best practice for system services.

Topics

#systemd#security hardening#least privilege#service configuration

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions