Difference between revisions of "nsswitch.conf"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
 
(→‎Sample File: modified file with WINS)
Line 27: Line 27:
 
   
 
   
 
  netgroup:      nis
 
  netgroup:      nis
 +
 +
Modified file to support WINS lookups first:
 +
# /etc/nsswitch.conf
 +
#
 +
# Example configuration of GNU Name Service Switch functionality.
 +
# If you have the `glibc-doc' and `info' packages installed, try:
 +
# `info libc "Name Service Switch"' for information about this file.
 +
 +
passwd:        compat
 +
group:          compat
 +
shadow:        compat
 +
 +
hosts:          files wins dns mdns
 +
networks:      files
 +
 +
protocols:      db files
 +
services:      db files
 +
ethers:        db files
 +
rpc:            db files
 +
 +
netgroup:      nis
 +
 
===notes===
 
===notes===
 
"files" typically refers to the "hosts" file; in this case, having "files" first on the "hosts" line means that "hosts" is checked for matches before dns and mdns are checked. (Not sure what mdns is.)
 
"files" typically refers to the "hosts" file; in this case, having "files" first on the "hosts" line means that "hosts" is checked for matches before dns and mdns are checked. (Not sure what mdns is.)

Revision as of 12:40, 18 December 2006

Navigation

computing: software: Linux: nsswitch.conf

Overview

In Linux, nsswitch.conf tells Linux's domain name resolver what methods to use for resolving domain names both within the local network (if any) and on the internet. Typically, DNS is used for resolving names on the internet, but it may be desirable to have other methods checked first in case the domain name in question is locally significant.

The file is typically located at "/etc/nsswitch.conf"

Sample File

From Ubuntu "Dapper" (6.06):

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat
group:          compat
shadow:         compat

hosts:          files dns mdns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

Modified file to support WINS lookups first:

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat
group:          compat
shadow:         compat

hosts:          files wins dns mdns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

notes

"files" typically refers to the "hosts" file; in this case, having "files" first on the "hosts" line means that "hosts" is checked for matches before dns and mdns are checked. (Not sure what mdns is.)