These days we had a little argument with a colleague. His statement was: host file on OS level has always priority over DNS, NIS, etc.
Hmmm … I did not agree. Why? Because I know from some Linux distributions there is an option to set this during the installation phase. Because here we speak for HP-UX I started to read the documentation for this OS. What I found is the same that is relevant for the other *nixa and it is the following.
Really the default sequence is first to check in host file, after that in resolve.conf. However, there is a third file named nsswitch.conf which can be used to change the sequence. If you would like to use DNS servers for name resolving first instead of host file (that is obsolete method by itself) then you should amend the line for hosts like this below:
hosts: dns [NOTFOUND=continue] files
Useful information:
Here: http://www.docs.hp.com/en/B3921-90010/nsswitch.conf.4.html











