1

In my /etc/nsswitch.conf have I set

hosts: files nis dns

With

ypwhich
ypcat hosts
ypcat passwd

can I verify that passwd and group are retrieved over NIS.

Question

How do I verify that DNS is working in NIS, as ping gets it DNS from /etc/resolve.conf and not NIS?

1 Answer 1

3

Normally ping and other commands to need host name resolving are linked to libc and should follow the order you demanded in /etc/nsswitch.conf and use /etc/hosts and NIS before resolving to dns.

nslookup and dig always consult DNS and never use the entries in /etc/hosts or NIS.

getent hosts <hostname | ip-address> will use the C resolver functions, honours nsswitch.conf and will show entries from your hosts file or the NIS directory before trying dns to lookup that hostname or ip-address

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .