LFCS · Question #59
Which of the following keywords can be used in the file /etc/nsswitch.conf to specify a source for host name lookups? (Choose TWO correct answers.)
The correct answer is B. dns D. files. This question identifies the keywords used in /etc/nsswitch.conf to specify sources for hostname lookups, defining the order of resolution.
Question
Options
- Aresolv
- Bdns
- Cremote
- Dfiles
- Ehosts
How the community answered
(29 responses)- A3% (1)
- B93% (27)
- E3% (1)
Why each option
This question identifies the keywords used in `/etc/nsswitch.conf` to specify sources for hostname lookups, defining the order of resolution.
`resolv` is not a valid keyword in `/etc/nsswitch.conf` for host lookups; `dns` is used instead.
The `dns` keyword indicates that host information should be obtained from DNS servers, as configured in `/etc/resolv.conf`.
`remote` is not a standard keyword used in `/etc/nsswitch.conf` to specify a source for host name lookups.
The `files` keyword specifies that host information should be obtained from local static files, specifically `/etc/hosts` for hostname resolution.
`hosts` is the database *entry* in `/etc/nsswitch.conf` (e.g., `hosts: files dns`), not a source keyword that follows the colon.
Concept tested: /etc/nsswitch.conf host lookup sources
Source: https://man7.org/linux/man-pages/man5/nsswitch.conf.5.html
Topics
Community Discussion
No community discussion yet for this question.