1852333 Members
6934 Online
104065 Solutions
New Discussion

Re: nsswitch.conf

 
Ralf Buchhold
Regular Advisor

nsswitch.conf

Hello
what is the correct entry in nsswitch.conf ?
I want look up first in NIS then in DNS and at last in files (by hosts)
also by passwd, services etc.
Thanks Ralf
6 REPLIES 6
KapilRaj
Honored Contributor

Re: nsswitch.conf

It is always better to keep hosts in the first place as if your network interface goes down still u can get hosts list. Keep a minimum list in /etc/hosts

hosts = local,nis,bind

Regds,

Kaps
Nothing is impossible
Stefan Farrelly
Honored Contributor

Re: nsswitch.conf

There are examples in /usr/newconfig/etc one is called nswwitch.nis, another is nsswitch.nisplus copy the one you want to /etc/nsswitch.conf and your in business.
Im from Palmerston North, New Zealand, but somehow ended up in London...
RAC_1
Honored Contributor

Re: nsswitch.conf

passwd: nis [NOTFOUND=continue] dns [NOTFOUND=continue] files
services: nis [NOTFOUND=continue] dns [NOTFOUND=continue] files

This only for passwd and services.

Anil
There is no substitute to HARDWORK
KapilRaj
Honored Contributor

Re: nsswitch.conf

I think I have typed aix's netsvc.conf ignore me please ....

Kaps
Nothing is impossible
Gary Cooper_1
Esteemed Contributor

Re: nsswitch.conf

Hi Ralf,

Have a look at http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B1031-90054/B1031-90054_top.html&con=/hpux/onlinedocs/B1031-90054/00/00/34-con.html&toc=/hpux/onlinedocs/B1031-90054/00/00/34-toc.html&searchterms=nsswitch.conf&queryid=20040421-040130

You could use:

hosts: nis [NOTFOUND=continue UNAVAIL=continue TRYAGAIN=continue] dns[NOTFOUND=continue UNAVAIL=continue TRYAGAIN=continue] files[NOTFOUND=return UNAVAIL=return TRYAGAIN=return]
passwd: nis [NOTFOUND=continue UNAVAIL=continue TRYAGAIN=continue] dns[NOTFOUND=continue UNAVAIL=continue TRYAGAIN=continue] files[NOTFOUND=return UNAVAIL=return TRYAGAIN=return]
services: nis [NOTFOUND=continue UNAVAIL=continue TRYAGAIN=continue] dns[NOTFOUND=continue UNAVAIL=continue TRYAGAIN=continue] files[NOTFOUND=return
UNAVAIL=return TRYAGAIN=return]

Regards,

Gary
Fabio Ettore
Honored Contributor

Re: nsswitch.conf

Hi Ralf,

/etc/nsswitch.conf:

hosts: nis [notfound=return] dns [notfound=return] files

Best regards,
Ettore
WISH? IMPROVEMENT!