Operating System - HP-UX
1831815 Members
2854 Online
110030 Solutions
New Discussion

File format of nsswitch.con

 
SOLVED
Go to solution
Cai Nan
Advisor

File format of nsswitch.con

Hi,every one.
In /etc/nsswitch.conf:
hosts:dns[NOTFOUND=continue UNAVAIL=continue TRYAGAIN=continue] files[NOTFOUND=return UNAVVAIL=continue TRYAGAIN=return]
What this mean,and which option could be changed?
Thanks!

--Frank
DAEMON
4 REPLIES 4
Steven Sim Kok Leong
Honored Contributor
Solution

Re: File format of nsswitch.con

Hi,

All the values can be changed depending on your requirements.

Status Meaning
SUCCESS Requested database entry was found
UNAVAIL Source is not responding or corrupted
NOTFOUND Source responded "no such entry"
TRYAGAIN Source is busy, might respond to retries

In your configuration of /etc/nsswitch.conf, the DNS is used before /etc/hosts is used for name resolution.

man 1m nsswitch.conf for more information.

Hope this helps. Regards.

Steven Sim Kok Leong
Michael Tully
Honored Contributor

Re: File format of nsswitch.con

Hi,

It is better to have the file option first.
If your DNS is down there will be a timeout
before it check the local hosts file. Try
changing the order to this:

hosts: files [NOTFOUND=continue UNAVAIL=return TRYAGAIN=return] dns [NOTFO
UND=return UNAVAIL=continue TRYAGAIN=return]

-Michael
Anyone for a Mutiny ?
Mary Ann Lipa
Valued Contributor

Re: File format of nsswitch.con

Hi Frank,
You can also change these entries via sam:
#sam
>>Networking And communications
>>>>Name Service Switch
>>>>>>hosts


-hope im right... :|

Which is worse, smoking or picking your nose in a public place?
Steve Steel
Honored Contributor

Re: File format of nsswitch.con

Hi


1)The doc is man switch

2)/usr/newconfig/etc contains example files


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)