CompTIA Linux+ XK0-006 Practice Test 40
Question 390
An operations team leaves this Linux condition unchanged: A NetworkManager host loses its manually assigned IPv4 address each time the interface reconnects. Which adverse consequence is MOST likely?
- Counting lines before removing duplicates can overstate the number of distinct user entries
- Applying a one-time ip addr add command can disappear at reboot and reintroduce the outage
- Modifying an unrelated application service cannot repair a missing or invalid kernel boot entry
- Forcing a single kernel object without its prerequisites can fail or leave the hardware unavailable
Explanation
Correct Answer
B:Applying a one-time ip addr add command can disappear at reboot and reintroduce the outage. This follows from the underlying Linux mechanism: ephemeral ip address changes do not replace persistent network connection configuration. A targeted remedy is to edit the correct NetworkManager connection profile with nmcli and reactivate it after verifying addressing. After correction, a useful verification is that nmcli and ip address show the approved address after reconnect and reboot.
Incorrect Answers
A:Counting lines before removing duplicates can overstate the number of distinct user entries can be a concern in another case, for example when a shell audit report must list unique users from the first field of a colon-delimited account file. The described Linux condition instead directly exposes this risk: applying a one-time ip addr add command can disappear at reboot and reintroduce the outage.
C:Modifying an unrelated application service cannot repair a missing or invalid kernel boot entry can be a concern in another case, for example when a UEFI Linux server stops before loading its kernel after its bootloader configuration is changed. The described Linux condition instead directly exposes this risk: applying a one-time ip addr add command can disappear at reboot and reintroduce the outage.
D:Forcing a single kernel object without its prerequisites can fail or leave the hardware unavailable can be a concern in another case, for example when a newly installed kernel module has unresolved dependencies when loaded manually with insmod. The described Linux condition instead directly exposes this risk: applying a one-time ip addr add command can disappear at reboot and reintroduce the outage.
Question 391
In the scenario An authentication service fails after an administrator installed a new PAM module for login hardening, the chosen corrective control is to restore a tested PAM rule order and check journal or auth logs for the failing module. What underlying mechanism makes this appropriate?
- Correlating distributed incidents requires comparable time sources and well-attributed log records
- A listener bound to loopback or an inaccessible interface is not reachable through the external network
- PAM control flags and order determine which authentication modules must succeed
- Duplicate IP ownership creates inconsistent ARP or neighbor resolution to different network interfaces
Explanation
Correct Answer
C:PAM control flags and order determine which authentication modules must succeed. That is the key operating principle behind the selected remediation, restore a tested PAM rule order and check journal or auth logs for the failing module. The distinction matters because randomly disabling password quality or MFA modules to restore login can weaken intended protections. An appropriate observable outcome is that authorized users log in under the complete approved PAM policy while prohibited attempts fail.
Incorrect Answers
A:Correlating distributed incidents requires comparable time sources and well-attributed log records is a valid explanation for another Linux operation, such as when a log pipeline reports a Linux service crash but its event timestamps are inconsistent across three hosts. The principle here is that PAM control flags and order determine which authentication modules must succeed.
B:A listener bound to loopback or an inaccessible interface is not reachable through the external network is a valid explanation for another Linux operation, such as when a public Linux server exposes TCP 8443 internally but remote connection attempts fail before a TLS handshake. The principle here is that PAM control flags and order determine which authentication modules must succeed.
D:Duplicate IP ownership creates inconsistent ARP or neighbor resolution to different network interfaces is a valid explanation for another Linux operation, such as when two Linux VMs intermittently disconnect because they have accidentally been assigned the same static address. The principle here is that PAM control flags and order determine which authentication modules must succeed.
Question 392
An administrator chooses to identify the PID and send SIGTERM first, reserving SIGKILL for a process that cannot exit cleanly because of this Linux issue: A runaway batch process consumes CPU and a team needs graceful shutdown before escalation. Which technical principle BEST explains the remediation?
- Holds and package priorities can override an otherwise available newer package candidate
- A running service is not automatically enabled to start at a boot target
- Package upgrades may install new defaults while retaining or replacing administrator-modified configuration files
- SIGTERM permits applications to handle shutdown while SIGKILL prevents user-space cleanup
Explanation
Correct Answer
D:SIGTERM permits applications to handle shutdown while SIGKILL prevents user-space cleanup. That is the key operating principle behind the selected remediation, identify the PID and send SIGTERM first, reserving SIGKILL for a process that cannot exit cleanly. The distinction matters because immediately sending SIGKILL to a transactional process can interrupt its normal cleanup or checkpoint. An appropriate observable outcome is that the process exits after termination and application integrity checks pass.
Incorrect Answers
A:Holds and package priorities can override an otherwise available newer package candidate is a valid explanation for another Linux operation, such as when an Ubuntu host needs a security fix but unattended upgrades are unintentionally held for one package. The principle here is that sIGTERM permits applications to handle shutdown while SIGKILL prevents user-space cleanup.
B:A running service is not automatically enabled to start at a boot target is a valid explanation for another Linux operation, such as when a critical daemon starts manually but does not return after a Linux server reboot. The principle here is that sIGTERM permits applications to handle shutdown while SIGKILL prevents user-space cleanup.
C:Package upgrades may install new defaults while retaining or replacing administrator-modified configuration files is a valid explanation for another Linux operation, such as when an application service fails after a configuration package update because its installed default file changed. The principle here is that sIGTERM permits applications to handle shutdown while SIGKILL prevents user-space cleanup.
Question 393
For this Linux+ scenario, A database support user needs a supplementary group but must retain their existing group memberships, the planned fix is to add the user with usermod -aG and verify memberships using id or groups. Why will that fix work?
- The append flag preserves existing supplementary memberships when adding a group
- Locking future password authentication does not always revoke every established authenticated process
- A symbolic link stores a target pathname that can be relative to the directory containing the link
- A persistent systemd calendar timer can trigger missed scheduled work after service manager activation
Explanation
Correct Answer
A:The append flag preserves existing supplementary memberships when adding a group. That is the key operating principle behind the selected remediation, add the user with usermod -aG and verify memberships using id or groups. The distinction matters because replacing the full supplemental group list unintentionally can revoke access to unrelated services. An appropriate observable outcome is that id reports the new support group alongside all previously approved groups.
Incorrect Answers
B:Locking future password authentication does not always revoke every established authenticated process is a valid explanation for another Linux operation, such as when a user has been removed from a business unit but an old SSH login session still exists. The principle here is that the append flag preserves existing supplementary memberships when adding a group.
C:A symbolic link stores a target pathname that can be relative to the directory containing the link is a valid explanation for another Linux operation, such as when a deployment creates a relative symbolic link that stops resolving after moving its parent directory. The principle here is that the append flag preserves existing supplementary memberships when adding a group.
D:A persistent systemd calendar timer can trigger missed scheduled work after service manager activation is a valid explanation for another Linux operation, such as when a periodic backup job needs a systemd timer that runs after a host was powered off overnight. The principle here is that the append flag preserves existing supplementary memberships when adding a group.
Question 394
For the Linux issue An organization needs to detect unexpected changes to critical binaries on production Linux hosts, the administrator applies initialize AIDE from a trusted baseline and schedule protected file-integrity comparisons. Which observation MOST directly confirms recovery?
- The approved client completes a TCP exchange while unsolicited new inbound traffic remains denied
- A controlled unauthorized binary modification triggers an integrity alert while unchanged files remain stable
- getent resolves a permitted directory user and a valid account can log in under the intended access policy
- The report records evaluated rules evidence and approved exceptions after a follow-up scan
Explanation
Correct Answer
B:A controlled unauthorized binary modification triggers an integrity alert while unchanged files remain stable. This outcome directly tests whether the Linux operation, initialize AIDE from a trusted baseline and schedule protected file-integrity comparisons, addresses the specified failure. The technical reason is that file integrity monitoring compares recorded cryptographic attributes and metadata with current filesystem state. Without correcting the underlying issue, taking a baseline after a compromise can legitimize the already modified malicious file.
Incorrect Answers
A:The approved client completes a TCP exchange while unsolicited new inbound traffic remains denied might confirm success for a different Linux problem, such as when a Linux server's nftables firewall accepts inbound connections but return traffic is unexpectedly dropped. Here the required evidence is that a controlled unauthorized binary modification triggers an integrity alert while unchanged files remain stable.
C:getent resolves a permitted directory user and a valid account can log in under the intended access policy might confirm success for a different Linux problem, such as when a company Linux server should authenticate corporate users through an existing LDAP identity service. Here the required evidence is that a controlled unauthorized binary modification triggers an integrity alert while unchanged files remain stable.
D:The report records evaluated rules evidence and approved exceptions after a follow-up scan might confirm success for a different Linux problem, such as when a compliance officer wants an auditable baseline comparison against a recognized hardened Linux configuration. Here the required evidence is that a controlled unauthorized binary modification triggers an integrity alert while unchanged files remain stable.
Question 395
In the scenario A virtualization operator clones a VM but both guest instances come up with duplicate network identities, the chosen corrective control is to generate unique guest machine identifiers and network configuration during the clone provisioning workflow. What underlying mechanism makes this appropriate?
- gzip compresses a stream while tar stores the file and directory entries to be selectively restored
- XFS supports online growth and its resizing tool differs from ext4's resize2fs
- A cloned disk image can carry identifiers that must be specialized for independent guest instances
- Host-only networking intentionally limits reachability compared with bridged or routed guest networks
Explanation
Correct Answer
C:A cloned disk image can carry identifiers that must be specialized for independent guest instances. That is the key operating principle behind the selected remediation, generate unique guest machine identifiers and network configuration during the clone provisioning workflow. The distinction matters because treating a binary disk clone as a fully independent identity can create network conflicts. An appropriate observable outcome is that both guests obtain distinct identifiers and can communicate without duplicate-address alarms.
Incorrect Answers
A:gzip compresses a stream while tar stores the file and directory entries to be selectively restored is a valid explanation for another Linux operation, such as when a large backup archive is compressed with gzip but the restore procedure expects to browse files without full extraction. The principle here is that a cloned disk image can carry identifiers that must be specialized for independent guest instances.
B:XFS supports online growth and its resizing tool differs from ext4's resize2fs is a valid explanation for another Linux operation, such as when an operator needs to grow an XFS filesystem after expanding its mounted block device. The principle here is that a cloned disk image can carry identifiers that must be specialized for independent guest instances.
D:Host-only networking intentionally limits reachability compared with bridged or routed guest networks is a valid explanation for another Linux operation, such as when a guest application must be accessible from the LAN but its interface uses an isolated host-only virtual network. The principle here is that a cloned disk image can carry identifiers that must be specialized for independent guest instances.
Question 396
After applying the relevant Linux fix for A log-rotation process cannot delete an archived file because another process still has it open, which evidence BEST demonstrates success?
- Attempts to start the masked unit are refused until change control removes the mask
- The application imports its required modules from its isolated environment while OS package integrity remains intact
- The updated service passes syntax validation and starts with the intended configuration overrides
- The appropriate process releases its descriptor and filesystem usage falls after cleanup
Explanation
Correct Answer
D:The appropriate process releases its descriptor and filesystem usage falls after cleanup. This outcome directly tests whether the Linux operation, check the path with lsof and resolve the owning process before retrying the maintenance step, addresses the specified failure. The technical reason is that open file descriptors can retain underlying files after their directory names change or disappear. Without correcting the underlying issue, repeatedly moving the file without identifying its open descriptor can leave disk blocks allocated.
Incorrect Answers
A:Attempts to start the masked unit are refused until change control removes the mask might confirm success for a different Linux problem, such as when an administrator wants to block a vulnerable service from being started accidentally during remediation. Here the required evidence is that the appropriate process releases its descriptor and filesystem usage falls after cleanup.
B:The application imports its required modules from its isolated environment while OS package integrity remains intact might confirm success for a different Linux problem, such as when a Python service installed libraries system-wide and broke distribution-managed dependencies. Here the required evidence is that the appropriate process releases its descriptor and filesystem usage falls after cleanup.
C:The updated service passes syntax validation and starts with the intended configuration overrides might confirm success for a different Linux problem, such as when an application service fails after a configuration package update because its installed default file changed. Here the required evidence is that the appropriate process releases its descriptor and filesystem usage falls after cleanup.
Question 397
A Linux+ operations scenario reports: An Ubuntu server becomes unreachable when applying a new Netplan file with the wrong gateway. Which remediation is MOST appropriate?
- Validate the YAML and use netplan try with rollback safeguards before making the network change permanent
- Generate unique guest machine identifiers and network configuration during the clone provisioning workflow
- Test a targeted sed or awk expression against a copy and compare the result before replacement
- Review the precise software licenses and distribution obligations before bundling the components
Explanation
Correct Answer
A:Validate the YAML and use netplan try with rollback safeguards before making the network change permanent. This directly addresses the stated Linux administration condition because Netplan generates backend network configuration and can provide temporary rollback if remote connectivity fails. If the underlying problem is ignored, applying an untested remote static route without rollback can lock out administrators. Verify the fix by confirming that the host retains reachable management access and the expected default route after confirmation.
Incorrect Answers
B:Generate unique guest machine identifiers and network configuration during the clone provisioning workflow could be useful for a different Linux requirement, for example when a virtualization operator clones a VM but both guest instances come up with duplicate network identities. In the current condition, the effective action is to validate the YAML and use netplan try with rollback safeguards before making the network change permanent.
C:Test a targeted sed or awk expression against a copy and compare the result before replacement could be useful for a different Linux requirement, for example when an engineer must replace only matching lines in a large configuration inventory while leaving others untouched. In the current condition, the effective action is to validate the YAML and use netplan try with rollback safeguards before making the network change permanent.
D:Review the precise software licenses and distribution obligations before bundling the components could be useful for a different Linux requirement, for example when a vendor proposes combining proprietary redistribution restrictions with copyleft-licensed source without a review. In the current condition, the effective action is to validate the YAML and use netplan try with rollback safeguards before making the network change permanent.
Question 398
For the Linux issue A Linux router has forwarding firewall rules but traffic still fails to pass between its interfaces, the administrator applies enable the appropriate kernel IP forwarding setting and validate routing and firewall decisions together. Which observation MOST directly confirms recovery?
- Root SSH login is rejected and named administrators can use approved audited sudo commands
- A permitted test flow crosses both interfaces and disallowed cross-segment traffic is still rejected
- An offline disk examination cannot read protected data and an authorized unlock mounts the filesystem
- An authorized user completes the supported second factor and a password-only attempt is denied
Explanation
Correct Answer
B:A permitted test flow crosses both interfaces and disallowed cross-segment traffic is still rejected. This outcome directly tests whether the Linux operation, enable the appropriate kernel IP forwarding setting and validate routing and firewall decisions together, addresses the specified failure. The technical reason is that netfilter rules do not by themselves turn a general-purpose Linux host into an IP router. Without correcting the underlying issue, adding more allow rules cannot forward packets when kernel IPv4 forwarding is disabled.
Incorrect Answers
A:Root SSH login is rejected and named administrators can use approved audited sudo commands might confirm success for a different Linux problem, such as when a production SSH daemon permits direct root password logins from any network. Here the required evidence is that a permitted test flow crosses both interfaces and disallowed cross-segment traffic is still rejected.
C:An offline disk examination cannot read protected data and an authorized unlock mounts the filesystem might confirm success for a different Linux problem, such as when a laptop holds confidential data on an unencrypted ext4 filesystem and may be stolen during travel. Here the required evidence is that a permitted test flow crosses both interfaces and disallowed cross-segment traffic is still rejected.
D:An authorized user completes the supported second factor and a password-only attempt is denied might confirm success for a different Linux problem, such as when a sensitive remote administration workflow currently accepts a stolen password without another factor. Here the required evidence is that a permitted test flow crosses both interfaces and disallowed cross-segment traffic is still rejected.
Question 399
A Linux administrator is evaluating the operational consequences of A firewalld rule works until reboot because an engineer changed only the running configuration. Which problem is MOST directly associated?
- Treating a passed vulnerability scan as equivalent to every configuration compliance control can miss hardening gaps
- Enabling a default deny without an explicit management allowance can disconnect a remote operator
- Relying on a temporary firewall-cmd change can reopen a prohibited port at the next reboot
- Adding more allow rules cannot forward packets when kernel IPv4 forwarding is disabled
Explanation
Correct Answer
C:Relying on a temporary firewall-cmd change can reopen a prohibited port at the next reboot. This follows from the underlying Linux mechanism: firewalld maintains runtime policy separately from persistent policy definitions. A targeted remedy is to add the reviewed rule to permanent firewalld configuration and reload it with runtime impact checks. After correction, a useful verification is that the intended permitted and denied port tests give the same results after restarting firewalld.
Incorrect Answers
A:Treating a passed vulnerability scan as equivalent to every configuration compliance control can miss hardening gaps can be a concern in another case, for example when a compliance officer wants an auditable baseline comparison against a recognized hardened Linux configuration. The described Linux condition instead directly exposes this risk: relying on a temporary firewall-cmd change can reopen a prohibited port at the next reboot.
B:Enabling a default deny without an explicit management allowance can disconnect a remote operator can be a concern in another case, for example when a remote Ubuntu host should allow administration from one subnet while denying other unsolicited inbound traffic. The described Linux condition instead directly exposes this risk: relying on a temporary firewall-cmd change can reopen a prohibited port at the next reboot.
D:Adding more allow rules cannot forward packets when kernel IPv4 forwarding is disabled can be a concern in another case, for example when a Linux router has forwarding firewall rules but traffic still fails to pass between its interfaces. The described Linux condition instead directly exposes this risk: relying on a temporary firewall-cmd change can reopen a prohibited port at the next reboot.
Question 400
A Linux host has not yet addressed this problem: A package update fails because an installed library conflicts with a newly requested application version. What is the MOST direct failure or security risk?
- Running recursive deletion with an untested find expression can erase unrelated files
- Merely disabling a unit does not prevent manual or dependency-triggered activation
- Running a network daemon directly as root expands the impact of application compromise
- Forcing removal of a shared library without impact assessment may break multiple system services
Explanation
Correct Answer
D:Forcing removal of a shared library without impact assessment may break multiple system services. This follows from the underlying Linux mechanism: dependency solvers consider installed package requirements and repository metadata during transactions. A targeted remedy is to inspect the package manager's dependency resolution and approved repositories before pinning versions. After correction, a useful verification is that a reviewed package transaction completes without unresolved dependencies or service regressions.
Incorrect Answers
A:Running recursive deletion with an untested find expression can erase unrelated files can be a concern in another case, for example when a maintenance team must locate configuration files modified during an outage in a large directory tree. The described Linux condition instead directly exposes this risk: forcing removal of a shared library without impact assessment may break multiple system services.
B:Merely disabling a unit does not prevent manual or dependency-triggered activation can be a concern in another case, for example when an administrator wants to block a vulnerable service from being started accidentally during remediation. The described Linux condition instead directly exposes this risk: forcing removal of a shared library without impact assessment may break multiple system services.
C:Running a network daemon directly as root expands the impact of application compromise can be a concern in another case, for example when a new application service should run under a noninteractive account without a home-directory login shell. The described Linux condition instead directly exposes this risk: forcing removal of a shared library without impact assessment may break multiple system services.