LFCS · 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 defines the order in which a system's C library resolves system information from various sources.
Question
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
(24 responses)- A92% (22)
- B4% (1)
- D4% (1)
Why each option
The nsswitch.conf file defines the order in which a system's C library resolves system information from various sources.
The nsswitch.conf file, or Name Service Switch configuration file, specifies which sources (e.g., local files, DNS, LDAP) should be queried by the system's C library to obtain name service information like hostnames, passwords, and groups.
Network protocol port numbers are typically defined in /etc/services.
While LDAP can be a source configured in nsswitch.conf for authentication, nsswitch.conf itself doesn't configure the LDAP service; it merely tells the system to use it as a lookup source.
System services enabled at boot are typically managed by init systems like systemd or sysvinit scripts, not nsswitch.conf.
Concept tested: Name Service Switch configuration (nsswitch.conf)
Source: https://man7.org/linux/man-pages/man5/nsswitch.conf.5.html
Topics
Community Discussion
No community discussion yet for this question.