nerdexam
Linux_Foundation

LFCS · 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 nsswitch.conf file determines the lookup order for various system information sources, including host names, passwords, and groups, for the C library functions.

Submitted by khalil_dz· Apr 18, 2026Service Configuration

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

(35 responses)
  • A
    94% (33)
  • B
    3% (1)
  • D
    3% (1)

Why each option

The `nsswitch.conf` file determines the lookup order for various system information sources, including host names, passwords, and groups, for the C library functions.

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

The `/etc/nsswitch.conf` file configures the Name Service Switch, which dictates the order and sources (like files, DNS, LDAP, NIS) that the system's C library functions should use to obtain information for various databases, such as `hosts`, `passwd`, `group`, and `networks`.

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

Network protocol port numbers are typically defined in `/etc/services`, not configured by `nsswitch.conf`.

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

While LDAP can be a source for `nsswitch.conf`, the file configures the *lookup order* for various services, not just LDAP authentication services specifically.

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

Configuration of network services for system boot is handled by tools like `systemctl` (for systemd) or init scripts, not by `nsswitch.conf`.

Concept tested: Name Service Switch purpose

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

Topics

#nsswitch.conf#name resolution#system configuration#C library

Community Discussion

No community discussion yet for this question.

Full LFCS Practice