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.
Question
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)- A92% (23)
- C4% (1)
- D4% (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.
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).
Network protocol port numbers are configured in /etc/services, not nsswitch.conf.
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.
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
Community Discussion
No community discussion yet for this question.