Question 580
The engineer proposes this implementation: Remove or correct the stale /etc/hosts mapping and verify name-service precedence. The requirement is: A hostname resolves in DNS but an application uses an outdated local override. Which technical explanation best supports the proposed action?
Explanation
Correct Answer
A local hosts entry can take precedence over DNS under the NSS hosts order, resulting in stale answers. It specifically supports the proposed action of Remove or correct the stale /etc/hosts mapping and verify name-service precedence. for the requirement described.
Incorrect Answers
This explains another Linux operation, namely Run dig @192.0.2.53 host.example A against the selected DNS server., where dig's @server argument directs the query to that resolver rather than the configured default. It does not explain why Remove or correct the stale /etc/hosts mapping and verify name-service precedence. satisfies the stated condition.
This explains another Linux operation, namely Inspect applicable nameserver directives in /etc/resolv.conf while accounting for managed/stub resolvers., where resolv.conf records the resolver endpoint configuration used by applicable libc resolver paths. It does not explain why Remove or correct the stale /etc/hosts mapping and verify name-service precedence. satisfies the stated condition.
This explains another Linux operation, namely Inspect the hosts database precedence in /etc/nsswitch.conf and test via getent hosts name., where NSS controls which name sources are consulted; getent exercises the configured system name service path. It does not explain why Remove or correct the stale /etc/hosts mapping and verify name-service precedence. satisfies the stated condition.






LPI Level 1 (102-500) Practice Tests