ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 151 - XK0-005 discussion

Report
Export

The security team has identified a web service that is running with elevated privileges A Linux administrator is working to change the systemd service file to meet security compliance standards.

Given the following output:

Which of the following remediation steps will prevent the web service from running as a privileged user?

A.
Removing the ExecStarWusr/sbin/webserver -D SOPTIONS from the service file
Answers
A.
Removing the ExecStarWusr/sbin/webserver -D SOPTIONS from the service file
B.
Updating the Environment File line in the [Service] section to/home/webservice/config
Answers
B.
Updating the Environment File line in the [Service] section to/home/webservice/config
C.
Adding the User-webservice to the [Service] section of the service file
Answers
C.
Adding the User-webservice to the [Service] section of the service file
D.
Changing the:nulti-user.target in the [Install] section to basic.target
Answers
D.
Changing the:nulti-user.target in the [Install] section to basic.target
Suggested answer: C

Explanation:

The remediation step that will prevent the web service from running as a privileged user is adding the User=webservice to the [Service] section of the service file. The service file is a configuration file that defines the properties and behavior of a systemd service. The systemd is a system and service manager that controls the startup and operation of Linux systems. The service file contains various sections and options that specify how the service should be started, stopped, and managed. The [Service] section defines how the service should be executed and what commands should be run.

The User option specifies the user name or ID that the service should run as. The webservice is the name of the user that the administrator wants to run the web service as. The administrator should add the User=webservice to the [Service] section of the service file, which will prevent the web service from running as a privileged user, such as root, and improve the security of the system. This is the correct remediation step to use to prevent the web service from running as a privileged user. The other options are incorrect because they either do not change the user that the service runs as (removing the ExecStart=/usr/sbin/webserver -D OPTIONS from the service file or updating the EnvironmentFile line in the [Service] section to /home/webservice/config) or do not affect the user that the service runs as (changing the multi-user.target in the [Install] section to basic.target). Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 15: Managing System Services, page 458.

asked 02/10/2024
Bernardo Garcia
43 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first