<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic /etc/hosts get ignored on redhat 6 in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/etc-hosts-get-ignored-on-redhat-6/m-p/5748155#M53818</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the following in&amp;nbsp;/etc/nsswitch.conf:&lt;/P&gt;&lt;P&gt;hosts:&amp;nbsp; files [NOTFOUND=continue] dns&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;hosts: files dns&lt;/P&gt;&lt;P&gt;Also, in /etc/host.conf&lt;/P&gt;&lt;P&gt;order files,bind&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whatever I do, /etc/hosts still could not get checked, as if get ignored. Would you please let me know why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 31 Jul 2012 21:24:17 GMT</pubDate>
    <dc:creator>Hanry Zhou</dc:creator>
    <dc:date>2012-07-31T21:24:17Z</dc:date>
    <item>
      <title>/etc/hosts get ignored on redhat 6</title>
      <link>https://community.hpe.com/t5/operating-system-linux/etc-hosts-get-ignored-on-redhat-6/m-p/5748155#M53818</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the following in&amp;nbsp;/etc/nsswitch.conf:&lt;/P&gt;&lt;P&gt;hosts:&amp;nbsp; files [NOTFOUND=continue] dns&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;hosts: files dns&lt;/P&gt;&lt;P&gt;Also, in /etc/host.conf&lt;/P&gt;&lt;P&gt;order files,bind&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whatever I do, /etc/hosts still could not get checked, as if get ignored. Would you please let me know why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2012 21:24:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/etc-hosts-get-ignored-on-redhat-6/m-p/5748155#M53818</guid>
      <dc:creator>Hanry Zhou</dc:creator>
      <dc:date>2012-07-31T21:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/hosts get ignored on redhat 6</title>
      <link>https://community.hpe.com/t5/operating-system-linux/etc-hosts-get-ignored-on-redhat-6/m-p/5777629#M53859</link>
      <description>&lt;P&gt;How are you checking?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you use either of nslookup or hosts then you will get unexpected results.&amp;nbsp; These commands ignore /etc/hosts and go directly to the DNS for name resolution.&amp;nbsp; The only way I know of checking the order in which names are resolved is to invoke something like ping, telnet or ssh, and see what address the hostname resolves to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2012 00:15:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/etc-hosts-get-ignored-on-redhat-6/m-p/5777629#M53859</guid>
      <dc:creator>Jim_Walls</dc:creator>
      <dc:date>2012-08-27T00:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/hosts get ignored on redhat 6</title>
      <link>https://community.hpe.com/t5/operating-system-linux/etc-hosts-get-ignored-on-redhat-6/m-p/5778455#M53861</link>
      <description>&lt;P&gt;In Linux, the "getent" command can be used to test hostname resolution using the order specified in /etc/nsswitch.conf.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;PRE&gt;# getent hosts localhost&lt;BR /&gt;# getent hosts localhost4
# getent hosts 127.0.0.1&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "getent" command can be used to test other name resolution services too: for example, "getent passwd username" would find the user's /etc/passwd information from any configured source (i.e. /etc/passwd, NIS and/or LDAP).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, make sure you haven't accidentally changed the permissions of the /etc directory or of the configuration files /etc/nsswitch.conf, /etc/resolv.conf and /etc/hosts: these need to be readable by all users, but writeable by root only.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2012 08:32:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/etc-hosts-get-ignored-on-redhat-6/m-p/5778455#M53861</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2012-08-27T08:32:43Z</dc:date>
    </item>
  </channel>
</rss>

