Hmm - still no luck
bash-3.00# ls -l /etc/hosts
lrwxrwxrwx 1 root root 12 Oct 23 15:11 /etc/hosts -> ./inet/hosts
bash-3.00# ls -l /etc/nsswitch.conf
-rw-r--r-- 1 root sys 1259 Oct 27 15:52 /etc/nsswitch.conf
bash-3.00# ls -l /etc/resolv.conf
-rw-r--r-- 1 root root 92 Oct 27 10:11 /etc/resolv.conf
bash-3.00#
Why does it seems to read from /etc/hosts when /etc/resolv.conf it removed from the quation by renaming it to something like /etc/resolv.old?
Main Topics
Browse All Topics





by: turnbulldPosted on 2009-10-27 at 14:21:26ID: 25677699
Given that moving resolv.conf helps the situation, perhaps this is not the issue. Still, the OS does not read /etc/hosts, it reads /etc/inet/hosts. The /etc/hosts file has to be a link back to /etc/inet/hosts. If you have a real file at /etc/hosts, you can change it all you want and the system will ignore those changes (drives ya nuts when this happens).
Check that the ls -l /etc/hosts shows it to be a link to /etc/inet/hosts. If not, change /etc/inet/hosts to be what you want, move /etc/hosts aside, and run this command:
ln -s /etc/inet/hosts /etc/hosts
If /etc/hosts is, indeed, a link to /etc/inet/hosts already, check file privs on /etc/resolv.conf and /etc/nsswitch.conf; they should be mode 644. That would be the #2 reason that I've seen for the behavior described.