nerdexam
CompTIA

LX0-104 · Question #502

Which of the following 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 name. The nsswitch.conf file configures the Name Service Switch (NSS) which determines the order and source for various system information lookups.

Essential System Services

Question

Which of the following 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 name
  • 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 reboot.

How the community answered

(26 responses)
  • A
    92% (24)
  • C
    4% (1)
  • D
    4% (1)

Why each option

The `nsswitch.conf` file configures the Name Service Switch (NSS) which determines the order and source for various system information lookups.

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

nsswitch.conf specifies which services the C library should consult for various types of system information, such as host names (`hosts`), passwords (`passwd`), groups (`group`), and services (`services`). It defines the order of sources, like `files` (local files like `/etc/hosts`) and `dns` for resolving hostnames, ensuring the system can properly locate requested information.

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`.

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

While NSS can be configured to use LDAP, nsswitch.conf primarily defines the lookup order for all name services, not solely LDAP authentication; LDAP configuration itself is typically handled by other files.

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

Configuring network services for system boot is handled by init scripts, systemd unit files, or service management tools, not nsswitch.conf.

Concept tested: Purpose of nsswitch.conf for name service resolution.

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

Topics

#nsswitch.conf#system configuration#name resolution

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice