cert
cert-1
cert-2

Pass CompTIA XK0-006 Exam in First Attempt Guaranteed!

Get 100% Latest Exam Questions, Accurate & Verified Answers to Pass the Actual Exam!
30 Days Free Updates, Instant Download!

cert-5
cert-6
XK0-006 Exam - Verified By Experts
XK0-006 Premium Bundle
$14.99

XK0-006 Premium Bundle

$74.99
$89.98
  • Premium File 160 Questions & Answers. Last update: Nov 15, 2026
  • Study Guide 1297 Pages
 
$89.98
$74.99
accept 32 downloads in last 7 days
block-screenshots
Purchase CompTIA XK0-006 Exam Training Products Individually
CompTIA XK0-006 Premium File
Premium File 160 Q&A
$76.99$69.99
CompTIA XK0-006 PDF Study Guide
Study Guide 1297 Pages
$21.99 $19.99
CompTIA XK0-006 Practice Test 31

Question 300

During a repeatability test on an independently built recovery environment, A developer pastes a production private key and customer records into an external AI assistant to ask for debugging advice. The change must be repeatable and must not rely on broad permissions or bypassed safeguards. Which TWO choices form the decisive diagnosis AND targeted remediation? Select TWO.

  1. Repair the host's designated resolver or DNS search configuration and confirm the intended record is published.
  2. Inspect task output and check whether the playbook uses purpose-built idempotent package modules rather than unconditional shell steps.
  3. Remove and rotate exposed secrets, follow incident procedures, and use sanitized synthetic reproduction data with approved tools for subsequent prompts.
  4. Run software composition/licensing review and choose an approved maintained dependency before incorporating the generated code.
  5. Inspect the submitted data categories, vendor retention controls and the organization's approved AI data-handling policy.

Explanation

Correct Answers

C:

Remove and rotate exposed secrets, follow incident procedures, and use sanitized synthetic reproduction data with approved tools for subsequent prompts. Prompt text may leave the intended trust boundary; sanitization and approved data governance are required before AI use. Pair it with the supporting check: Inspect the submitted data categories, vendor retention controls and the organization's approved AI data-handling policy.

E:

Inspect the submitted data categories, vendor retention controls and the organization's approved AI data-handling policy. Prompt text may leave the intended trust boundary; sanitization and approved data governance are required before AI use. Pair this evidence with the targeted change: Remove and rotate exposed secrets, follow incident procedures, and use sanitized synthetic reproduction data with approved tools for subsequent prompts.

Incorrect Answers

A:

Repair the host's designated resolver or DNS search configuration and confirm the intended record is published. This choice concerns dns resolution versus tcp connectivity fault rather than the required diagnosis-and-change pair for sensitive data leakage into prompts. Compare the needed evidence (Inspect the submitted data categories, vendor retention controls and the organization's approved AI data-handling policy.) with the repair (Remove and rotate exposed secrets, follow incident procedures, and use sanitized synthetic reproduction data with approved tools for subsequent prompts.).

B:

Inspect task output and check whether the playbook uses purpose-built idempotent package modules rather than unconditional shell steps. This choice concerns ansible idempotent package management rather than the required diagnosis-and-change pair for sensitive data leakage into prompts. Compare the needed evidence (Inspect the submitted data categories, vendor retention controls and the organization's approved AI data-handling policy.) with the repair (Remove and rotate exposed secrets, follow incident procedures, and use sanitized synthetic reproduction data with approved tools for subsequent prompts.).

D:

Run software composition/licensing review and choose an approved maintained dependency before incorporating the generated code. This choice concerns ai-generated dependency licensing review rather than the required diagnosis-and-change pair for sensitive data leakage into prompts. Compare the needed evidence (Inspect the submitted data categories, vendor retention controls and the organization's approved AI data-handling policy.) with the repair (Remove and rotate exposed secrets, follow incident procedures, and use sanitized synthetic reproduction data with approved tools for subsequent prompts.).

Question 301

During validation of an authorized change at a primary-site Linux operations cluster, A disk-controller driver is installed after the initramfs was built, so an otherwise healthy root volume is inaccessible during early boot. The operator must identify the affected mechanism before approving changes to other services. Which postchange observation most directly demonstrates successful remediation?

  1. The USB device enumerates in lsusb, binds to a driver, and exposes its intended network interface.
  2. A test boot locates the root block device before pivoting to the real root, and no missing-controller module error remains.
  3. A redeployed pod reads the rotated credential from the approved secret path and Git contains no active secret.
  4. The recovery boot mounts and unlocks the root volume with the expected initramfs before systemd starts userspace services.

Explanation

Correct Answer

B:

A test boot locates the root block device before pivoting to the real root, and no missing-controller module error remains. This is direct acceptance evidence for rebuilding early-boot driver inventory rather than a generic process check. Early boot cannot use modules only present on the root disk when the driver to reach that disk is absent from initramfs. It validates the correction: Rebuild the initramfs for the target kernel with dracut or the distribution's equivalent and include the required signed storage module. Scenario context: During validation of an authorized change at a primary-site Linux operations cluster, A disk-controller driver is installed after the initramfs was built, so an otherwise healthy root volume is inaccessible during early boot. The operator must identify the affected mechanism before approving changes to other services.

Incorrect Answers

A:

The USB device enumerates in lsusb, binds to a driver, and exposes its intended network interface. This outcome would support detecting pci versus usb hardware, but does not establish that the reported rebuilding early-boot driver inventory problem is resolved. The required direct acceptance test is: A test boot locates the root block device before pivoting to the real root, and no missing-controller module error remains. Scenario context: During validation of an authorized change at a primary-site Linux operations cluster, A disk-controller driver is installed after the initramfs was built, so an otherwise healthy root volume is inaccessible during early boot. The operator must identify the affected mechanism before approving changes to other services.

C:

A redeployed pod reads the rotated credential from the approved secret path and Git contains no active secret. This outcome would support kubernetes configmap versus secret handling, but does not establish that the reported rebuilding early-boot driver inventory problem is resolved. The required direct acceptance test is: A test boot locates the root block device before pivoting to the real root, and no missing-controller module error remains.

D:

The recovery boot mounts and unlocks the root volume with the expected initramfs before systemd starts userspace services. This outcome would support bootloader versus initramfs stages, but does not establish that the reported rebuilding early-boot driver inventory problem is resolved. The required direct acceptance test is: A test boot locates the root block device before pivoting to the real root, and no missing-controller module error remains.

Question 302

During a production incident affecting a Linux application node, A microservice sometimes returns HTTP 503, but centralized logs lack host identity and timestamps are unsynchronized, so events cannot be correlated. The operator must identify the affected mechanism before approving changes to other services. What targeted corrective action best addresses the underlying problem?

  1. Monitor a bounded application health endpoint or representative transaction instead of relying solely on PID existence.
  2. Normalize clocks and structured log labels, then aggregate service and host events with consistent identifiers.
  3. Restore reachable approved identity servers and correct SSSD domain/name-service integration, then clear stale cache only if justified.
  4. Correct the mount configuration, adding appropriate network-dependent handling or nofail where business rules allow, and test with mount -a.

Explanation

Correct Answer

B:

Normalize clocks and structured log labels, then aggregate service and host events with consistent identifiers. This action corrects correlating service logs with host metrics without substituting an unrelated change. Time alignment and common identifiers enable diagnosis across distributed logs; raw unlabelled messages are hard to connect. Before acting, verify: Compare log collector timestamps, host names, request correlation IDs and service metrics over the same incident window. Afterward confirm: A known request failure can be traced across application, host and dependency logs by timestamp and correlation ID.

Incorrect Answers

A:

Monitor a bounded application health endpoint or representative transaction instead of relying solely on PID existence. This is a change associated with service health-check signal versus process running, not a targeted repair of correlating service logs with host metrics. The described signal instead calls for: Normalize clocks and structured log labels, then aggregate service and host events with consistent identifiers.

C:

Restore reachable approved identity servers and correct SSSD domain/name-service integration, then clear stale cache only if justified. This is a change associated with sssd central identity lookup, not a targeted repair of correlating service logs with host metrics. The described signal instead calls for: Normalize clocks and structured log labels, then aggregate service and host events with consistent identifiers.

D:

Correct the mount configuration, adding appropriate network-dependent handling or nofail where business rules allow, and test with mount -a. This is a change associated with corrupted fstab mount at boot, not a targeted repair of correlating service logs with host metrics. The described signal instead calls for: Normalize clocks and structured log labels, then aggregate service and host events with consistent identifiers. Scenario context: During a production incident affecting a Linux application node, A microservice sometimes returns HTTP 503, but centralized logs lack host identity and timestamps are unsynchronized, so events cannot be correlated. The operator must identify the affected mechanism before approving changes to other services.

Question 303

During a repeatability test on an independently built recovery environment, A team merges a feature branch with configuration edits and resolves a conflict by accepting one entire file, accidentally dropping a security change from the other branch. The change must be repeatable and must not rely on broad permissions or bypassed safeguards. Which check most directly tests the fault described in this case?

  1. Inspect the conflict markers, git diff and both parents' intended changes before staging the resolution.
  2. Compare current policy artifacts with a version-controlled baseline and correlated auditd or file integrity events.
  3. Inspect remote/local commit graphs and branch protection rules to determine whether the branch is already shared.
  4. Inspect generated command arguments, affected paths, privilege requirements and a dry-run/test fixture before execution.

Explanation

Correct Answer

A:

Inspect the conflict markers, git diff and both parents' intended changes before staging the resolution. This checks the mechanism behind git conflict resolution without loss. Git conflicts require semantic reconciliation of competing edits, not automatically discarding a whole side. Once identified, the targeted correction is: Resolve the conflict by combining the required changes, review the resulting diff and run configuration validation/tests before commit. Confirm by checking: The merge commit retains both intended settings and tests pass without unresolved conflict markers. Scenario context: During a repeatability test on an independently built recovery environment, A team merges a feature branch with configuration edits and resolves a conflict by accepting one entire file, accidentally dropping a security change from the other branch. The change must be repeatable and must not rely on broad permissions or bypassed safeguards.

Incorrect Answers

B:

Compare current policy artifacts with a version-controlled baseline and correlated auditd or file integrity events. This can investigate auditable configuration drift detection, but the given incident points to git conflict resolution without loss. It is not the most decisive first evidence here. The discriminating test is: Inspect the conflict markers, git diff and both parents' intended changes before staging the resolution. Scenario context: During a repeatability test on an independently built recovery environment, A team merges a feature branch with configuration edits and resolves a conflict by accepting one entire file, accidentally dropping a security change from the other branch. The change must be repeatable and must not rely on broad permissions or bypassed safeguards.

C:

Inspect remote/local commit graphs and branch protection rules to determine whether the branch is already shared. This can investigate git history rewrite on shared branch, but the given incident points to git conflict resolution without loss. It is not the most decisive first evidence here. The discriminating test is: Inspect the conflict markers, git diff and both parents' intended changes before staging the resolution. Scenario context: During a repeatability test on an independently built recovery environment, A team merges a feature branch with configuration edits and resolves a conflict by accepting one entire file, accidentally dropping a security change from the other branch. The change must be repeatable and must not rely on broad permissions or bypassed safeguards.

D:

Inspect generated command arguments, affected paths, privilege requirements and a dry-run/test fixture before execution. This can investigate ai-generated shell command validation, but the given incident points to git conflict resolution without loss. It is not the most decisive first evidence here. The discriminating test is: Inspect the conflict markers, git diff and both parents' intended changes before staging the resolution. Scenario context: During a repeatability test on an independently built recovery environment, A team merges a feature branch with configuration edits and resolves a conflict by accepting one entire file, accidentally dropping a security change from the other branch. The change must be repeatable and must not rely on broad permissions or bypassed safeguards.

Question 304

During a forensic reproduction of the fault at a secondary Linux test site, A server becomes sluggish with high load average even though user CPU utilization is modest; block I/O latency spikes during the incident. The change must be repeatable and must not rely on broad permissions or bypassed safeguards. Which check most directly tests the fault described in this case?

  1. Compare iostat -xz, process I/O rates and CPU %iowait to confirm storage stalls rather than pure CPU demand.
  2. Inspect exception handling and the observed failure traceback in a controlled test run.
  3. Inspect cgroup CPU quota, throttled-period counters and container runtime CPU limits under load.
  4. Inspect SSH authentication logs, effective sshd authentication settings and faillock or the active PAM lock records.

Explanation

Correct Answer

A:

Compare iostat -xz, process I/O rates and CPU %iowait to confirm storage stalls rather than pure CPU demand. This checks the mechanism behind high i/o wait mistaken for cpu saturation. Linux load can include uninterruptible I/O waiters; high load average is not equivalent to CPU saturation. Once identified, the targeted correction is: Identify and reduce the slow storage request path or noisy disk workload, then validate latency under representative load. Confirm by checking: Disk await and utilization normalize and application response times improve without adding CPU solely because load average was high. Scenario context: During a forensic reproduction of the fault at a secondary Linux test site, A server becomes sluggish with high load average even though user CPU utilization is modest; block I/O latency spikes during the incident. The change must be repeatable and must not rely on broad permissions or bypassed safeguards.

Incorrect Answers

B:

Inspect exception handling and the observed failure traceback in a controlled test run. This can investigate python exception handling specificity, but the given incident points to high i/o wait mistaken for cpu saturation. It is not the most decisive first evidence here. The discriminating test is: Compare iostat -xz, process I/O rates and CPU %iowait to confirm storage stalls rather than pure CPU demand. Scenario context: During a forensic reproduction of the fault at a secondary Linux test site, A server becomes sluggish with high load average even though user CPU utilization is modest; block I/O latency spikes during the incident. The change must be repeatable and must not rely on broad permissions or bypassed safeguards.

C:

Inspect cgroup CPU quota, throttled-period counters and container runtime CPU limits under load. This can investigate cpu throttling under cgroup quota, but the given incident points to high i/o wait mistaken for cpu saturation. It is not the most decisive first evidence here. The discriminating test is: Compare iostat -xz, process I/O rates and CPU %iowait to confirm storage stalls rather than pure CPU demand. Scenario context: During a forensic reproduction of the fault at a secondary Linux test site, A server becomes sluggish with high load average even though user CPU utilization is modest; block I/O latency spikes during the incident. The change must be repeatable and must not rely on broad permissions or bypassed safeguards.

D:

Inspect SSH authentication logs, effective sshd authentication settings and faillock or the active PAM lock records. This can investigate ssh login denied by account lock policy, but the given incident points to high i/o wait mistaken for cpu saturation. It is not the most decisive first evidence here. The discriminating test is: Compare iostat -xz, process I/O rates and CPU %iowait to confirm storage stalls rather than pure CPU demand. Scenario context: During a forensic reproduction of the fault at a secondary Linux test site, A server becomes sluggish with high load average even though user CPU utilization is modest; block I/O latency spikes during the incident. The change must be repeatable and must not rely on broad permissions or bypassed safeguards.

Question 305

During an ordinary maintenance shift on a multi-user Linux service host, A daemon needs to flush state and close sockets but an operations script always sends SIGKILL, causing corrupt pending work. The operator must identify the affected mechanism before approving changes to other services. Which TWO selections jointly provide the right evidence and corrective action? Select TWO.

  1. Configure supported link monitoring and compatible bond/switch settings for the approved active-backup or aggregation mode.
  2. Schedule the command as a one-time at job with logged output rather than an indefinitely recurring cron entry.
  3. Inspect the pulled image's immutable digest and deployment image reference alongside the approved build manifest.
  4. Send SIGTERM or use the service's supported graceful stop first, with time-limited escalation only if it does not exit.
  5. Inspect the process PID, service unit behavior and prior journal messages around forced termination.

Explanation

Correct Answers

D:

Send SIGTERM or use the service's supported graceful stop first, with time-limited escalation only if it does not exit. SIGTERM is catchable for graceful cleanup; SIGKILL immediately terminates without user-space handlers. Pair it with the supporting check: Inspect the process PID, service unit behavior and prior journal messages around forced termination.

E:

Inspect the process PID, service unit behavior and prior journal messages around forced termination. SIGTERM is catchable for graceful cleanup; SIGKILL immediately terminates without user-space handlers. Pair this evidence with the targeted change: Send SIGTERM or use the service's supported graceful stop first, with time-limited escalation only if it does not exit.

Incorrect Answers

A:

Configure supported link monitoring and compatible bond/switch settings for the approved active-backup or aggregation mode. This choice concerns bonded nic failover detection rather than the required diagnosis-and-change pair for graceful process shutdown signal. Compare the needed evidence (Inspect the process PID, service unit behavior and prior journal messages around forced termination.) with the repair (Send SIGTERM or use the service's supported graceful stop first, with time-limited escalation only if it does not exit.).

B:

Schedule the command as a one-time at job with logged output rather than an indefinitely recurring cron entry. This choice concerns one-time versus recurring scheduling rather than the required diagnosis-and-change pair for graceful process shutdown signal. Compare the needed evidence (Inspect the process PID, service unit behavior and prior journal messages around forced termination.) with the repair (Send SIGTERM or use the service's supported graceful stop first, with time-limited escalation only if it does not exit.). Scenario context: During an ordinary maintenance shift on a multi-user Linux service host, A daemon needs to flush state and close sockets but an operations script always sends SIGKILL, causing corrupt pending work. The operator must identify the affected mechanism before approving changes to other services.

C:

Inspect the pulled image's immutable digest and deployment image reference alongside the approved build manifest. This choice concerns container image provenance by digest rather than the required diagnosis-and-change pair for graceful process shutdown signal. Compare the needed evidence (Inspect the process PID, service unit behavior and prior journal messages around forced termination.) with the repair (Send SIGTERM or use the service's supported graceful stop first, with time-limited escalation only if it does not exit.).

Question 306

During a planned automation rollout to a Linux fleet, A team merges a feature branch with configuration edits and resolves a conflict by accepting one entire file, accidentally dropping a security change from the other branch. The operator must identify the affected mechanism before approving changes to other services. Which controlled change is the most appropriate next step after verifying this failure?

  1. Resolve the conflict by combining the required changes, review the resulting diff and run configuration validation/tests before commit.
  2. Make deployment depend on successful required build, security and integration test jobs with protected approval for production.
  3. Set the address, prefix, gateway, and DNS on the correct persistent NetworkManager connection profile and reactivate it safely.
  4. Run software composition/licensing review and choose an approved maintained dependency before incorporating the generated code.

Explanation

Correct Answer

A:

Resolve the conflict by combining the required changes, review the resulting diff and run configuration validation/tests before commit. This action corrects git conflict resolution without loss without substituting an unrelated change. Git conflicts require semantic reconciliation of competing edits, not automatically discarding a whole side. Before acting, verify: Inspect the conflict markers, git diff and both parents' intended changes before staging the resolution. Afterward confirm: The merge commit retains both intended settings and tests pass without unresolved conflict markers. Scenario context: During a planned automation rollout to a Linux fleet, A team merges a feature branch with configuration edits and resolves a conflict by accepting one entire file, accidentally dropping a security change from the other branch. The operator must identify the affected mechanism before approving changes to other services.

Incorrect Answers

B:

Make deployment depend on successful required build, security and integration test jobs with protected approval for production. This is a change associated with ci pipeline test gate before deployment, not a targeted repair of git conflict resolution without loss. The described signal instead calls for: Resolve the conflict by combining the required changes, review the resulting diff and run configuration validation/tests before commit.

C:

Set the address, prefix, gateway, and DNS on the correct persistent NetworkManager connection profile and reactivate it safely. This is a change associated with persistent networkmanager static address, not a targeted repair of git conflict resolution without loss. The described signal instead calls for: Resolve the conflict by combining the required changes, review the resulting diff and run configuration validation/tests before commit.

D:

Run software composition/licensing review and choose an approved maintained dependency before incorporating the generated code. This is a change associated with ai-generated dependency licensing review, not a targeted repair of git conflict resolution without loss. The described signal instead calls for: Resolve the conflict by combining the required changes, review the resulting diff and run configuration validation/tests before commit.

Question 307

During a forensic reproduction of the fault at a secondary Linux test site, A JVM service pauses repeatedly while swap-in/out rates rise and physical memory pressure stays near its limit. The change must be repeatable and must not rely on broad permissions or bypassed safeguards. Which diagnostic provides the most decisive FIRST evidence for the stated failure?

  1. Inspect vmstat si/so, memory pressure metrics, resident-set sizes and cgroup limits.
  2. Inspect ip route get for a remote destination, directly connected routes and neighbor reachability of the configured gateway.
  3. Compare command -v, the interactive PATH, and the environment captured by the scheduled noninteractive shell.
  4. Inspect per-thread CPU time, blocked-stack evidence and lock contention metrics before resizing the instance.

Explanation

Correct Answer

A:

Inspect vmstat si/so, memory pressure metrics, resident-set sizes and cgroup limits. This checks the mechanism behind swapping-induced application latency. Sustained swapping can greatly increase latency even when CPU usage and disk free-space metrics appear normal. Once identified, the targeted correction is: Address the memory working-set pressure by fixing excess allocation or adjusting justified capacity/limits, without indiscriminately disabling swap. Confirm by checking: Swap activity and memory stalls fall during peak demand while the service meets response-time requirements. Scenario context: During a forensic reproduction of the fault at a secondary Linux test site, A JVM service pauses repeatedly while swap-in/out rates rise and physical memory pressure stays near its limit. The change must be repeatable and must not rely on broad permissions or bypassed safeguards.

Incorrect Answers

B:

Inspect ip route get for a remote destination, directly connected routes and neighbor reachability of the configured gateway. This can investigate incorrect default gateway on dual subnet host, but the given incident points to swapping-induced application latency. It is not the most decisive first evidence here. The discriminating test is: Inspect vmstat si/so, memory pressure metrics, resident-set sizes and cgroup limits. Scenario context: During a forensic reproduction of the fault at a secondary Linux test site, A JVM service pauses repeatedly while swap-in/out rates rise and physical memory pressure stays near its limit. The change must be repeatable and must not rely on broad permissions or bypassed safeguards.

C:

Compare command -v, the interactive PATH, and the environment captured by the scheduled noninteractive shell. This can investigate path in noninteractive jobs, but the given incident points to swapping-induced application latency. It is not the most decisive first evidence here. The discriminating test is: Inspect vmstat si/so, memory pressure metrics, resident-set sizes and cgroup limits. Scenario context: During a forensic reproduction of the fault at a secondary Linux test site, A JVM service pauses repeatedly while swap-in/out rates rise and physical memory pressure stays near its limit. The change must be repeatable and must not rely on broad permissions or bypassed safeguards.

D:

Inspect per-thread CPU time, blocked-stack evidence and lock contention metrics before resizing the instance. This can investigate thread contention versus raw cpu capacity, but the given incident points to swapping-induced application latency. It is not the most decisive first evidence here. The discriminating test is: Inspect vmstat si/so, memory pressure metrics, resident-set sizes and cgroup limits. Scenario context: During a forensic reproduction of the fault at a secondary Linux test site, A JVM service pauses repeatedly while swap-in/out rates rise and physical memory pressure stays near its limit. The change must be repeatable and must not rely on broad permissions or bypassed safeguards.

Question 308

While preparing a recovery-site Linux node for a repeatable cutover, A restored application directory contains all files, but the service refuses to read secret configuration because ownership and permissions were not restored appropriately. The change must be repeatable and must not rely on broad permissions or bypassed safeguards. Which diagnostic provides the most decisive FIRST evidence for the stated failure?

  1. List archive metadata with tar -tvf and compare target path ownership and permissions with a known-good backup manifest.
  2. Run rsync --dry-run -av with the exact source and destination paths and inspect the previewed relative paths.
  3. Inspect ip route show default, ip route get for a real destination, and per-connection route metrics.
  4. Correlate the AVC source/target contexts and the expected service policy using ausearch and ls -Z.

Explanation

Correct Answer

A:

List archive metadata with tar -tvf and compare target path ownership and permissions with a known-good backup manifest. This checks the mechanism behind tar permissions preservation on restore. Recovering bytes alone is insufficient for Linux services that depend on discretionary ownership and mode semantics. Once identified, the targeted correction is: Restore the archive with appropriate privileges and ownership/permission preservation, then reconcile service users before startup. Confirm by checking: The restored tree matches expected owner, mode and content checksums and the service reads only authorized paths. Scenario context: While preparing a recovery-site Linux node for a repeatable cutover, A restored application directory contains all files, but the service refuses to read secret configuration because ownership and permissions were not restored appropriately. The change must be repeatable and must not rely on broad permissions or bypassed safeguards.

Incorrect Answers

B:

Run rsync --dry-run -av with the exact source and destination paths and inspect the previewed relative paths. This can investigate rsync source trailing slash semantics, but the given incident points to tar permissions preservation on restore. It is not the most decisive first evidence here. The discriminating test is: List archive metadata with tar -tvf and compare target path ownership and permissions with a known-good backup manifest. Scenario context: While preparing a recovery-site Linux node for a repeatable cutover, A restored application directory contains all files, but the service refuses to read secret configuration because ownership and permissions were not restored appropriately. The change must be repeatable and must not rely on broad permissions or bypassed safeguards.

C:

Inspect ip route show default, ip route get for a real destination, and per-connection route metrics. This can investigate route metrics for preferred uplink, but the given incident points to tar permissions preservation on restore. It is not the most decisive first evidence here. The discriminating test is: List archive metadata with tar -tvf and compare target path ownership and permissions with a known-good backup manifest. Scenario context: While preparing a recovery-site Linux node for a repeatable cutover, A restored application directory contains all files, but the service refuses to read secret configuration because ownership and permissions were not restored appropriately. The change must be repeatable and must not rely on broad permissions or bypassed safeguards.

D:

Correlate the AVC source/target contexts and the expected service policy using ausearch and ls -Z. This can investigate selinux avc denial versus unix mode, but the given incident points to tar permissions preservation on restore. It is not the most decisive first evidence here. The discriminating test is: List archive metadata with tar -tvf and compare target path ownership and permissions with a known-good backup manifest. Scenario context: While preparing a recovery-site Linux node for a repeatable cutover, A restored application directory contains all files, but the service refuses to read secret configuration because ownership and permissions were not restored appropriately. The change must be repeatable and must not rely on broad permissions or bypassed safeguards.

Question 309

During a planned automation rollout to a Linux fleet, A maintenance script always enters its restore branch because it tests a pathname as a nonempty string rather than checking whether the file exists. The operator must identify the affected mechanism before approving changes to other services. Which check most directly tests the fault described in this case?

  1. Inspect the service account, systemd User= setting, file ownership and required syscall/filesystem access.
  2. Review the constructed command and input trust boundary and reproduce with a filename containing shell metacharacters.
  3. Inspect component exit statuses and reproduce the failing pipeline with and without set -o pipefail under Bash.
  4. Inspect the if condition and reproduce it with an absent file using test -f or [[ -f ... ]].

Explanation

Correct Answer

D:

Inspect the if condition and reproduce it with an absent file using test -f or [[ -f ... ]]. This checks the mechanism behind file existence conditional in bash. A nonempty pathname string is not proof of an existing regular file; -f checks filesystem state. Once identified, the targeted correction is: Use a file-type test such as [[ -f "$path" ]] before processing a required regular file and handle the absent-file path. Confirm by checking: A missing test file takes the expected error branch while a regular test file is processed. Scenario context: During a planned automation rollout to a Linux fleet, A maintenance script always enters its restore branch because it tests a pathname as a nonempty string rather than checking whether the file exists. The operator must identify the affected mechanism before approving changes to other services.

Incorrect Answers

A:

Inspect the service account, systemd User= setting, file ownership and required syscall/filesystem access. This can investigate least privilege for service processes, but the given incident points to file existence conditional in bash. It is not the most decisive first evidence here. The discriminating test is: Inspect the if condition and reproduce it with an absent file using test -f or [[ -f ... ]]. Scenario context: During a planned automation rollout to a Linux fleet, A maintenance script always enters its restore branch because it tests a pathname as a nonempty string rather than checking whether the file exists. The operator must identify the affected mechanism before approving changes to other services.

B:

Review the constructed command and input trust boundary and reproduce with a filename containing shell metacharacters. This can investigate python subprocess invocation safety, but the given incident points to file existence conditional in bash. It is not the most decisive first evidence here. The discriminating test is: Inspect the if condition and reproduce it with an absent file using test -f or [[ -f ... ]]. Scenario context: During a planned automation rollout to a Linux fleet, A maintenance script always enters its restore branch because it tests a pathname as a nonempty string rather than checking whether the file exists. The operator must identify the affected mechanism before approving changes to other services.

C:

Inspect component exit statuses and reproduce the failing pipeline with and without set -o pipefail under Bash. This can investigate pipeline exit status propagation, but the given incident points to file existence conditional in bash. It is not the most decisive first evidence here. The discriminating test is: Inspect the if condition and reproduce it with an absent file using test -f or [[ -f ... ]]. Scenario context: During a planned automation rollout to a Linux fleet, A maintenance script always enters its restore branch because it tests a pathname as a nonempty string rather than checking whether the file exists. The operator must identify the affected mechanism before approving changes to other services.

Question 310

During an ordinary maintenance shift on a multi-user Linux service host, A compliance review reports that one service-administration account has no password expiry even though the default policy changed last month. The operator must identify the affected mechanism before approving changes to other services. Which controlled change is the most appropriate next step after verifying this failure?

  1. Lock the local password with passwd -l username, and separately disable other authorized login methods if policy requires full account access revocation.
  2. Correct the unit-specific misconfiguration identified in journal events, reload manager configuration when unit files change, and restart under change control.
  3. Remove and rotate exposed secrets, follow incident procedures, and use sanitized synthetic reproduction data with approved tools for subsequent prompts.
  4. Apply the approved password aging settings to the specific account with chage and verify the new dates.

Explanation

Correct Answer

D:

Apply the approved password aging settings to the specific account with chage and verify the new dates. This action corrects user password expiry visibility without substituting an unrelated change. Existing account aging values do not automatically change when global defaults are modified for future accounts. Before acting, verify: Inspect chage -l username and /etc/shadow for the account's actual aging fields rather than assuming defaults apply retroactively. Afterward confirm: chage -l shows the approved maximum days, warning period and expiration fields for the intended user. Scenario context: During an ordinary maintenance shift on a multi-user Linux service host, A compliance review reports that one service-administration account has no password expiry even though the default policy changed last month. The operator must identify the affected mechanism before approving changes to other services.

Incorrect Answers

A:

Lock the local password with passwd -l username, and separately disable other authorized login methods if policy requires full account access revocation. This is a change associated with local account lock versus password expiration, not a targeted repair of user password expiry visibility. The described signal instead calls for: Apply the approved password aging settings to the specific account with chage and verify the new dates. Scenario context: During an ordinary maintenance shift on a multi-user Linux service host, A compliance review reports that one service-administration account has no password expiry even though the default policy changed last month. The operator must identify the affected mechanism before approving changes to other services.

B:

Correct the unit-specific misconfiguration identified in journal events, reload manager configuration when unit files change, and restart under change control. This is a change associated with systemd journal correlation, not a targeted repair of user password expiry visibility. The described signal instead calls for: Apply the approved password aging settings to the specific account with chage and verify the new dates. Scenario context: During an ordinary maintenance shift on a multi-user Linux service host, A compliance review reports that one service-administration account has no password expiry even though the default policy changed last month. The operator must identify the affected mechanism before approving changes to other services.

C:

Remove and rotate exposed secrets, follow incident procedures, and use sanitized synthetic reproduction data with approved tools for subsequent prompts. This is a change associated with sensitive data leakage into prompts, not a targeted repair of user password expiry visibility. The described signal instead calls for: Apply the approved password aging settings to the specific account with chage and verify the new dates. Scenario context: During an ordinary maintenance shift on a multi-user Linux service host, A compliance review reports that one service-administration account has no password expiry even though the default policy changed last month. The operator must identify the affected mechanism before approving changes to other services.

CompTIA Linux+ (XK0-006) Practice Tests