QuestionQ176

Networking

Which of the following is a valid line/entry that could appear in the /etc/nsswitch.conf file?

  • A multi on
  • B 192.168.168.4 dns-server
  • C hosts: files dns
  • D include /etc/nsswitch.d/
Explanation

The /etc/nsswitch.conf file controls which sources (and in what order) are consulted for various system databases such as hosts, passwd, and group. Entries follow the format database: service [service...]. The line hosts: files dns is valid syntax, instructing the resolver to first check the local /etc/hosts file and then fall back to DNS for hostname resolution. multi on is a directive used in /etc/host.conf, not /etc/nsswitch.conf. An IP-to-hostname mapping like 192.168.168.4 dns-server belongs in /etc/hosts. There is no include directive syntax supported in /etc/nsswitch.conf.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!