nerdexam
CompTIA

XK0-005 · Question #1214

An administrator needs to change the DNS domain search order of a single Linux host to localize it better. Which of the following files should the administrator edit?

The correct answer is C. /etc/nsswitch.conf. The 'search order' here refers to the order in which name resolution methods are consulted system-wide. /etc/nsswitch.conf (Name Service Switch) controls this order via the 'hosts:' line, for example: 'hosts: files dns' means check /etc/hosts first, then query DNS. Changing…

System Management

Question

An administrator needs to change the DNS domain search order of a single Linux host to localize it better. Which of the following files should the administrator edit?

Options

  • A/etc/resolv.conf
  • B/etc/hosts
  • C/etc/nsswitch.conf
  • D/etc/dhcpd.conf

How the community answered

(24 responses)
  • A
    4% (1)
  • B
    8% (2)
  • C
    83% (20)
  • D
    4% (1)

Explanation

The 'search order' here refers to the order in which name resolution methods are consulted system-wide. /etc/nsswitch.conf (Name Service Switch) controls this order via the 'hosts:' line, for example: 'hosts: files dns' means check /etc/hosts first, then query DNS. Changing this file lets the administrator prioritize local file resolution over DNS or vice versa, 'localizing' the host's resolution behavior. /etc/resolv.conf specifies which DNS servers to query and what domain suffixes to append, but not the resolution method order. /etc/hosts provides static mappings. /etc/dhcpd.conf is a DHCP server configuration file, unrelated to this task.

Topics

#Hostname Resolution#DNS Configuration#/etc/nsswitch.conf#Linux System Administration

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice