nerdexam
GIAC

GSLC · Question #108

Which of the following files must be configured to enable hostname lookups to use the Domain Name Service (DNS)?

The correct answer is C. /etc/nsswitch.conf. /etc/nsswitch.conf is the Linux Name Service Switch configuration file that must be edited to include 'dns' as a source for hostname lookups.

Security Architecture & Engineering

Question

Which of the following files must be configured to enable hostname lookups to use the Domain Name Service (DNS)?

Options

  • Alibnss_ldap
  • B/etc/pam.d
  • C/etc/nsswitch.conf
  • D/etc/pam.d/sshd

How the community answered

(36 responses)
  • A
    3% (1)
  • B
    3% (1)
  • C
    89% (32)
  • D
    6% (2)

Why each option

/etc/nsswitch.conf is the Linux Name Service Switch configuration file that must be edited to include 'dns' as a source for hostname lookups.

Alibnss_ldap

libnss_ldap is a shared library that enables LDAP-backed name service queries; it is not a configuration file that activates DNS hostname resolution.

B/etc/pam.d

/etc/pam.d is a directory containing PAM (Pluggable Authentication Modules) configuration files for user authentication and has no role in hostname or DNS resolution.

C/etc/nsswitch.confCorrect

/etc/nsswitch.conf controls which databases and resolvers the system consults, and in what order, for various lookups including hostname resolution. To enable DNS, the 'hosts' entry in this file must list 'dns' as a source (e.g., 'hosts: files dns'). Without this configuration, the system will not forward unresolved hostnames to a DNS server regardless of other DNS settings.

D/etc/pam.d/sshd

/etc/pam.d/sshd configures PAM authentication specifically for the SSH daemon and does not influence how the system resolves hostnames via DNS.

Concept tested: Linux nsswitch.conf configuration for DNS resolution

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

Topics

#DNS configuration#nsswitch.conf#hostname resolution#Linux

Community Discussion

No community discussion yet for this question.

Full GSLC Practice