nerdexam
CompTIA

LX0-104 · Question #275

Which of the following lines would an administrator find in the file /etc/nsswitch.conf?

The correct answer is C. hosts: files dns. The /etc/nsswitch.conf file contains directives that define the lookup order for various system information, such as hosts: files dns.

Essential System Services

Question

Which of the following lines would an administrator find in the file /etc/nsswitch.conf?

Options

  • Aorder hosts,bind
  • B192.168.168.4 dns-server
  • Chosts: files dns
  • Ddomain mycompany.com

How the community answered

(44 responses)
  • A
    2% (1)
  • B
    2% (1)
  • C
    89% (39)
  • D
    7% (3)

Why each option

The `/etc/nsswitch.conf` file contains directives that define the lookup order for various system information, such as `hosts: files dns`.

Aorder hosts,bind

`order hosts,bind` is a directive found in older `resolv.conf` or similar files for specifying resolver order, not in `nsswitch.conf`.

B192.168.168.4 dns-server

`192.168.168.4 dns-server` is an entry typically found in `/etc/hosts` to map an IP address to a hostname, not a directive for `nsswitch.conf`.

Chosts: files dnsCorrect

The `/etc/nsswitch.conf` file configures the order in which Name Service Switch services search for information. The line `hosts: files dns` is a common entry specifying that hostname lookups should first consult `/etc/hosts` (`files`) and then use DNS servers.

Ddomain mycompany.com

`domain mycompany.com` is a directive typically found in `/etc/resolv.conf` to specify the default domain for hostname resolution, not a configuration line for `nsswitch.conf`.

Concept tested: Name Service Switch (nsswitch.conf) configuration

Source: https://man7.org/linux/man-pages/man5/nsswitch.conf.5.html

Topics

#NSS configuration#name service switch#user authentication

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice