correctly.
A sample file for
Example 6.1: Sample host.conf File
# /etc/host.conf
# We have named running, but no NIS (yet)
order bind,hosts
# Allow multiple addrs
multi on
# Guard against spoof attempts
nospoof on
# Trim local domain (not really necessary).
trim vbrew.com.
Resolver environment variables
The settings from
This variable specifies a file to be read instead of
This variable overrides the
This variable determines the measures taken against spoofing. It is completely disabled by
This variable uses a value of
This variable specifies a list of trim domains that override those given in
This variable specifies a list of trim domains that are added to those given in
The nsswitch.conf File
Version 2 of the GNU standard library includes a more powerful and flexible replacement for the older
The
Options in
The following options are available:
Use the Domain Name System (DNS) service to resolve the address. This makes sense only for host address resolution, not network address resolution. This mechanism uses the
Search a local file for the host or network name and its corresponding address. This option uses the traditional
Use the Network Information System (NIS) to resolve the host or network address. NIS and NIS+ are discussed in detail in Chapter 13, The Network Information System.
The order in which the services to be queried are listed determines the order in which they are queried when attempting to resolve a name. The query-order list is in the service description in the
A simple example of host and network database specification that would mimic our configuration using the older libc standard library is shown in Example 6.2.
Example 6.2: Sample nsswitch.conf File
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# Information about this file is available in the `libc6-doc' package.
hosts: dns files
networks: files
This example causes the system to look up hosts first in the Domain Name System, and the
You are able to control the lookup behavior more precisely using 'action items' that describe what action to take given the result of the previous lookup attempt. Action items appear between service specifications, and are enclosed within square brackets,
[[!]
…]
There are two possible actions:
Controls returns to the program that attempted the name resolution. If a lookup attempt was successful,