Courseiva
Knowledge + Practice
CertificationsVendorsCareer RoadmapsLabs & ToolsStudy GuidesGlossaryPractice Questions
C
Courseiva

Free IT certification practice questions with explained answers for CCNA, CompTIA, AWS, Azure, Google Cloud, and more.

Certification Practice Questions

CCNA practice questionsSecurity+ SY0-701 practice questionsAWS SAA-C03 practice questionsAZ-104 practice questionsAZ-900 practice questionsCLF-C02 practice questionsA+ Core 1 practice questionsGoogle Cloud ACE practice questionsCySA+ CS0-003 practice questionsNetwork+ N10-009 practice questions
View all certifications →

Product

CertificationsCertification PathsExam TopicsPractice TestsExam Dumps vs Practice TestsStudy HubComparisons

Free Resources

Difficulty IndexLearn — Free ChaptersIT GlossaryFree Tools & LabsStudy GuidesCareer RoadmapsBrowse by VendorCisco Command ReferenceCCNA Scenarios

Company

AboutContactEditorial PolicyQuestion Writing PolicyTrust Center

Legal

Privacy PolicyTerms of Service

Courseiva is a free IT certification practice platform offering original exam-style practice questions, detailed explanations, topic-based practice, mock exams, readiness tracking, and study analytics for Cisco, CompTIA, Microsoft, AWS, and other technology certifications.

© 2026 Courseiva. Courseiva is operated by JTNetSolutions Ltd. All rights reserved.

Courseiva is an independent certification practice platform and is not affiliated with, endorsed by, or sponsored by Cisco, Microsoft, AWS, CompTIA, Google, ISC2, ISACA, or any other certification vendor. Vendor names and certification marks are used only to identify the exams learners are preparing for.

HomeCertificationsXK0-005TopicsSecurity
Free · No Signup RequiredCompTIA · XK0-005

XK0-005 Security Practice Questions

20+ practice questions focused on Security — one of the most tested topics on the CompTIA Linux+ XK0-005 exam. Each question includes a detailed explanation so you learn why the right answer is correct.

Start Security Practice

Exam Domains

SecurityTroubleshootingScripting, Containers, and AutomationSystem ManagementScripting, Containers and AutomationAll domains →

Study Tools

Practice TestMock ExamFlashcardsAll Topics

Sample Security Questions

Practice all 20+ →
1.

A Linux administrator needs to add a new user named 'jdoe' with a home directory and a bash shell. Which command accomplishes this?

A.usermod -m -s /bin/bash jdoe
B.adduser jdoe --home /home/jdoe --shell /bin/bash
C.useradd -m -s /bin/bash jdoe
D.passwd -m jdoe

Explanation: The useradd command with -m creates the home directory and -s sets the shell. useradd -m -s /bin/bash jdoe is correct.

2.

A security audit reveals that users can change their password without meeting complexity requirements. Which PAM module should be configured to enforce password complexity?

A.pam_faillock
B.pam_unix
C.pam_tally2
D.pam_pwquality

Explanation: pam_pwquality is the module that enforces password quality rules like length, character classes, etc.

3.

An administrator wants to allow the user 'ops' to run only the command '/usr/bin/systemctl restart httpd' via sudo on a specific host 'webserver'. Which /etc/sudoers entry is correct?

A.ops webserver=(root) /usr/bin/systemctl restart httpd
B.ops ALL=(root) /usr/bin/systemctl restart httpd
C.ops webserver=(ALL) /usr/bin/systemctl restart httpd
D.ops webserver=(root) ALL

Explanation: The format is: username hostname=(runas) command. For host-specific, use the hostname. The correct entry is 'ops webserver=(root) /usr/bin/systemctl restart httpd'.

4.

An administrator needs to allow incoming TCP traffic on port 8443 using firewalld. Which command should be used to make this change persistent?

A.firewall-cmd --zone=public --add-port=8443/tcp
B.firewall-cmd --add-service=8443/tcp --permanent
C.firewall-cmd --add-port=8443/tcp
D.firewall-cmd --add-port=8443/tcp --permanent && firewall-cmd --reload

Explanation: To add a port, use firewall-cmd --add-port=8443/tcp --permanent and then reload.

5.

A system is running SELinux in enforcing mode. A custom application needs to write to /var/log/app.log. The log file shows the correct context, but access is denied. What is the most likely cause?

A.The file context is incorrect.
B.The application is running in an unconfined domain.
C.The SELinux boolean for the application is disabled.
D.SELinux is in permissive mode.

Explanation: SELinux policy may not allow the application's domain to write to that file; audit2allow can generate a policy. But the question implies a boolean or context issue. However, typical cause is missing policy rule. But among options, 'The application is running in an unconfined domain' is plausible but not best. Actually, the most common cause is that the file context is wrong. But given the file has correct context, the issue is likely a boolean or policy. However, the best answer is 'A transition to the wrong domain'? I'll go with 'The SELinux boolean for the application is disabled'.

+15 more Security questions available

Practice all Security questions

How to master Security for XK0-005

1. Baseline your knowledge

Start with 10 questions to gauge your current understanding of Security. This tells you whether you need a concept refresher or just practice.

2. Review every explanation

For each question — right or wrong — read the full explanation. Understanding why an answer is correct is more valuable than knowing the answer itself.

3. Focus on exam traps

Security questions on the XK0-005 frequently use trap wording. Look for subtle differences in answers that test your precision, not just general knowledge.

4. Reach 80% consistently

Do repeated sessions until you score 80%+ three times in a row. Then move to mixed-mode practice to test cross-topic recall under realistic conditions.

Frequently asked questions

How many XK0-005 Security questions are on the real exam?

The exact number varies per candidate. Security is tested as part of the CompTIA Linux+ XK0-005 blueprint. Practicing with targeted Security questions ensures you can handle any format or difficulty that appears.

Are these XK0-005 Security practice questions free?

Yes. Courseiva provides free XK0-005 practice questions across all exam topics and domains. The platform includes topic-based practice, mock exams, missed-question review, bookmarked questions, and readiness tracking — no account required.

Is Security one of the harder XK0-005 topics?

Difficulty is subjective, but Security is a high-priority exam concept tested in multiple ways — direct recall, scenario analysis, and command-output interpretation. Consistent practice is the best way to build confidence.

Ready to practice?

Launch a full Security practice session with instant scoring and detailed explanations.

Start Security Practice →

Topic Info

Topic

Security

Exam

XK0-005

Questions available

20+