Question 570
The engineer proposes this implementation: Inspect the hosts database precedence in /etc/nsswitch.conf and test via getent hosts name. The requirement is: A workstation fails to resolve a locally defined hostname despite a correct IP address in /etc/hosts. Which technical explanation best supports the proposed action?
Explanation
Correct Answer
NSS controls which name sources are consulted; getent exercises the configured system name service path. It specifically supports the proposed action of Inspect the hosts database precedence in /etc/nsswitch.conf and test via getent hosts name. 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 Inspect the hosts database precedence in /etc/nsswitch.conf and test via getent hosts name. satisfies the stated condition.
This explains another Linux operation, namely Run dig +short host.example A., where The +short option prints condensed result data rather than verbose query sections. It does not explain why Inspect the hosts database precedence in /etc/nsswitch.conf and test via getent hosts name. satisfies the stated condition.
This explains another Linux operation, namely Remove or correct the stale /etc/hosts mapping and verify name-service precedence., where A local hosts entry can take precedence over DNS under the NSS hosts order, resulting in stale answers. It does not explain why Inspect the hosts database precedence in /etc/nsswitch.conf and test via getent hosts name. satisfies the stated condition.






LPI Level 1 (102-500) Practice Tests