Wednesday, June 13, 2007

Getting Solaris to use DNS

I was surprised today, after a day of frustration, to find that Solaris doesn't use DNS by default. Whenever I used dig or nslookup the names would resolve just fine, but ping and other utilities would complain about an unknown host. So somewhere there was a disconnect about using my /etc/resolv.conf.


I had previously set up my /etc/nsswitch.conf to get passwd information from a central server, but I was surprised to find out that the nsswitch.conf I had modified didn't include DNS resolution.

hosts: files

You can enable DNS resolution by changing it to the following

hosts: files dns

And suddely ping works again.

No comments: