Difference between revisions of "nsswitch.conf"
m (→Sample File: changes for 6.10) |
|||
(One intermediate revision by the same user not shown) | |||
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 | ||
+ | The default nsswitch.conf in Ubuntu 6.10 no longer mentions "mdns" in the "hosts:" line. | ||
===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.) |
Latest revision as of 12:43, 18 December 2006
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
The default nsswitch.conf in Ubuntu 6.10 no longer mentions "mdns" in the "hosts:" line.
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.)