Which file is used to configure services that determine information such as hostnames, password files, and group files?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Boost your Linux skills with the CompTIA Linux+ Certification Exam simulator. Engage with multiple choice questions and detailed feedback. Master Linux concepts and prepare for your exam with confidence!

The file that is crucial for configuring how different databases of information, such as hostnames, password files, and group files, are accessed is /etc/nsswitch.conf. This configuration file defines the order and method by which services provide name resolution for various types of queries. It specifies what sources to consult for various types of information (e.g., local files, NIS, DNS) and in what order those sources should be checked.

For instance, when a system needs to resolve a hostname to an IP address, it will consult /etc/nsswitch.conf to determine whether to first check /etc/hosts, DNS servers, or other name resolution services. This flexibility allows system administrators to configure the system's behavior to suit their networking environment, ensuring that the correct information sources are used effectively.

The other files listed serve different purposes:

  • /etc/services contains a list of network services and their corresponding port numbers and protocols.
  • /etc/passwd is used to hold user account information, including usernames and user IDs.
  • /etc/hosts provides a simple mapping of IP addresses to hostnames for local name resolution but is not involved in the broader configuration of service lookups that /etc/nsswitch.conf handles.

Thus

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy