Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what is nsswitch.conf ?

Status
Not open for further replies.

alanchia

Technical User
Jan 8, 2003
42
SG
Hi all,

1) i would like to ask what is nsswitch.conf and what does this file do ?

2) what does it mean by " your primary address resolution method, files, is not supported,. Supported primary address resolution methods are dns and nis, Please update /etc/nsswitch.conf " How do i update this file ?

thanks,
alanchia
 
This is the file that tells Solaris how you want it to go about looking up certain information. DNS and NIS will cause it to ask a server for information (such as translating a hostname to an IP address). Files will cause it to look at local config files (such as /etc/hosts to translate a host name to an IP address). My file looks like...
[tt]
passwd: files
group: files
hosts: files dns
networks: files
protocols: files
rpc: files
ethers: files
netmasks: files
bootparams: files
publickey: files
# At present there isn't a 'files' backend for netgroup; the system will
# figure it out pretty quickly, and won't use netgroups at all.
netgroup: files
automount: files
aliases: files
services: files
sendmailvars: files
[/tt]
This means that is uses local files for finding all of these types of information, but will also try DNS if it can't find a host name in /etc/hosts.

Files should be a valid option for any of these. Please post your /etc/nsswitch.conf. There may be something else wrong with it.
 
hi Sambones,
here is my /etc/nsswitch.conf file

#
# /etc/nsswitch.dns:
#
# An example file that could be copied over to /etc/nsswitch.conf; it uses
# DNS for hosts lookups, otherwise it does not use any other naming service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.

passwd: files
group: files

# You must also set up the /etc/resolv.conf file for DNS name
# server lookup. See resolv.conf(4).
hosts: files dns
ipnodes: files
# Uncomment the following line and comment out the above to resolve
# both IPv4 and IPv6 addresses from the ipnodes databases. Note that
# IPv4 addresses are searched in all of the ipnodes databases before
# searching the hosts databases. Before turning this option on, consult
# the Network Administration Guide for more details on using IPv6.
#ipnodes: files dns

networks: files
protocols: files
rpc: files
ethers: files
netmasks: files
bootparams: files
publickey: files
# At present there isn't a 'files' backend for netgroup; the system will
# figure it out pretty quickly, and won't use netgroups at all.
netgroup: files
automount: files
aliases: files
services: files
sendmailvars: files
printers: user files

auth_attr: files
prof_attr: files
project: files
 
You do have an /etc/resolv.conf and an /etc/hosts file?
 
yes i do have /etc/resolv.conf and an /etc/hosts file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top