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.
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
(35 responses)- A94% (33)
- B3% (1)
- D3% (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.
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`.
Network protocol port numbers are typically defined in `/etc/services`, not configured by `nsswitch.conf`.
While LDAP can be a source for `nsswitch.conf`, the file configures the *lookup order* for various services, not just LDAP authentication services specifically.
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
Community Discussion
No community discussion yet for this question.