nerdexam
CompTIA

LX0-104 · Question #66

What is the purpose of the nsswitch.conf file?

The correct answer is A. It is used to configure where the C library looks for system information such as host names and. The /etc/nsswitch.conf file configures the Name Service Switch (NSS) which determines the order and sources the C library uses to retrieve various system information, including hostnames, passwords, and groups. This centralizes the lookup mechanism for different services.

Essential System Services

Question

What is the purpose of the nsswitch.conf file?

Options

  • AIt is used to configure where the C library looks for system information such as host names and
  • BIt is used to configure network protocol port numbers such as for HTTP or SMTP.
  • CIt is used to configure LDAP authentication services for the local system.
  • DIt is used to configure which network services will be turned on during the next system boot.

How the community answered

(25 responses)
  • A
    92% (23)
  • C
    4% (1)
  • D
    4% (1)

Why each option

The /etc/nsswitch.conf file configures the Name Service Switch (NSS) which determines the order and sources the C library uses to retrieve various system information, including hostnames, passwords, and groups. This centralizes the lookup mechanism for different services.

AIt is used to configure where the C library looks for system information such as host names andCorrect

The /etc/nsswitch.conf file controls how standard C library functions resolve common system database entries like hostnames, passwords, groups, and services. It defines the lookup order for sources such as local files (files), DNS (dns), LDAP (ldap), and NIS (nis).

BIt is used to configure network protocol port numbers such as for HTTP or SMTP.

Network protocol port numbers are configured in /etc/services, not nsswitch.conf.

CIt is used to configure LDAP authentication services for the local system.

While nsswitch.conf can point to LDAP for user/group information, it does not directly configure LDAP authentication services themselves, which are typically managed by a separate client configuration.

DIt is used to configure which network services will be turned on during the next system boot.

Enabling or disabling network services during boot is managed by service managers like systemd or SysVinit scripts, not nsswitch.conf.

Concept tested: nsswitch.conf purpose

Source: https://linux.die.net/man/5/nsswitch.conf

Topics

#nsswitch.conf#name service switch#system information lookup

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice