<?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 Re: nsswitch question in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/nsswitch-question/m-p/4990756#M47422</link>
    <description>This "may" end up looking like a repost.&lt;BR /&gt;Sorry if it does, it is taking about FIVE minutes to post right now, and I saw a change I wanted to make, and instead of a follow up - I'm trying to get it all in one post, in case it hasn't gone through yet.&lt;BR /&gt;--------Excuse if it is a double post--------&lt;BR /&gt;&lt;BR /&gt;The command to resolve a name to an ip address - regardless of whether or not it is resolved in a dns server, or a host file, nis etc. is already in linux.&lt;BR /&gt;&lt;BR /&gt;Run "gethostip" from the command line.&lt;BR /&gt;&lt;BR /&gt;$&amp;gt; gethostip hostA&lt;BR /&gt;&lt;BR /&gt;will return something like&lt;BR /&gt;hostA 192.168.xxx.xxx [8 digit hex number]&lt;BR /&gt;&lt;BR /&gt;$&amp;gt; gethostip -d hostA&lt;BR /&gt;&lt;BR /&gt;will return just the ip address&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;</description>
    <pubDate>Thu, 13 Jul 2006 16:43:43 GMT</pubDate>
    <dc:creator>TwoProc</dc:creator>
    <dc:date>2006-07-13T16:43:43Z</dc:date>
    <item>
      <title>nsswitch question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nsswitch-question/m-p/4990753#M47419</link>
      <description>Hi,&lt;BR /&gt;  I have a Redhat webserver (HP DL360). When&lt;BR /&gt;doing "nslookup hostA" it said not found even&lt;BR /&gt;hostA is in /etc/hosts. The nsswitch.conf&lt;BR /&gt;defines to search files first:&lt;BR /&gt;hosts:      files [NOTFOUND=continue] dns&lt;BR /&gt; &lt;BR /&gt;  The /etc/resovle.conf looks like this:&lt;BR /&gt;domain xyz.com&lt;BR /&gt;search xyz.com&lt;BR /&gt;nameserver 192.168.xx.yy&lt;BR /&gt;&lt;BR /&gt;  Why nslookup did not go to files first? what's wrong with nsswitch.conf file?&lt;BR /&gt;&lt;BR /&gt;Lynn</description>
      <pubDate>Thu, 13 Jul 2006 13:03:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nsswitch-question/m-p/4990753#M47419</guid>
      <dc:creator>Lynn Hsu_2</dc:creator>
      <dc:date>2006-07-13T13:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: nsswitch question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nsswitch-question/m-p/4990754#M47420</link>
      <description>The nslookup dig and host command will always try to use only DNS, they won't consult the /etc/hosts file. There is nothing wrong with your nsswitch.conf file.</description>
      <pubDate>Thu, 13 Jul 2006 15:12:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nsswitch-question/m-p/4990754#M47420</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2006-07-13T15:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: nsswitch question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nsswitch-question/m-p/4990755#M47421</link>
      <description>The command to resolve a name to an ip address - regardless of whether or not it is resolved in a dns server, or a host file, nis etc. is already in linux.&lt;BR /&gt;&lt;BR /&gt;Run "gethostip" from the command line.&lt;BR /&gt;&lt;BR /&gt;$&amp;gt; gethostip hostA&lt;BR /&gt;&lt;BR /&gt;will return something like&lt;BR /&gt;hostA 192.168.xxx.xxx [8 digit hex number]&lt;BR /&gt;&lt;BR /&gt;so, you'd want something like&lt;BR /&gt;&lt;BR /&gt;$&amp;gt; gethostip hostA | cut -f 2 -d" "&lt;BR /&gt;192.168.xxx.xxx&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Jul 2006 16:37:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nsswitch-question/m-p/4990755#M47421</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2006-07-13T16:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: nsswitch question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nsswitch-question/m-p/4990756#M47422</link>
      <description>This "may" end up looking like a repost.&lt;BR /&gt;Sorry if it does, it is taking about FIVE minutes to post right now, and I saw a change I wanted to make, and instead of a follow up - I'm trying to get it all in one post, in case it hasn't gone through yet.&lt;BR /&gt;--------Excuse if it is a double post--------&lt;BR /&gt;&lt;BR /&gt;The command to resolve a name to an ip address - regardless of whether or not it is resolved in a dns server, or a host file, nis etc. is already in linux.&lt;BR /&gt;&lt;BR /&gt;Run "gethostip" from the command line.&lt;BR /&gt;&lt;BR /&gt;$&amp;gt; gethostip hostA&lt;BR /&gt;&lt;BR /&gt;will return something like&lt;BR /&gt;hostA 192.168.xxx.xxx [8 digit hex number]&lt;BR /&gt;&lt;BR /&gt;$&amp;gt; gethostip -d hostA&lt;BR /&gt;&lt;BR /&gt;will return just the ip address&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Jul 2006 16:43:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nsswitch-question/m-p/4990756#M47422</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2006-07-13T16:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: nsswitch question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nsswitch-question/m-p/4990757#M47423</link>
      <description>Thanks for the replies. So on Linux, is nsswitch.conf still useful? I think&lt;BR /&gt;it is for the name resolution search order.&lt;BR /&gt;&lt;BR /&gt;Lynn</description>
      <pubDate>Thu, 13 Jul 2006 16:46:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nsswitch-question/m-p/4990757#M47423</guid>
      <dc:creator>Lynn Hsu_2</dc:creator>
      <dc:date>2006-07-13T16:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: nsswitch question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nsswitch-question/m-p/4990758#M47424</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;nsswitch.conf is critical. It decides how a system will resolve hostnames, how it will authenticate users, any number of things.&lt;BR /&gt;&lt;BR /&gt;It is problably the most important configuration file after the network configuration.&lt;BR /&gt;&lt;BR /&gt;As posted your nsswitch.conf file, which must be in the /etc directory should look in files first and then if not found continue to DNS.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Fri, 14 Jul 2006 06:35:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nsswitch-question/m-p/4990758#M47424</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2006-07-14T06:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: nsswitch question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nsswitch-question/m-p/4990759#M47425</link>
      <description>The issue you are seeing is that nslookup doesn't use nsswitch.conf to determine where to find conversions from names to numbers, just resolv.conf.&lt;BR /&gt;&lt;BR /&gt;applications like 'ping' use the standard system calls to do their resolution work. &lt;BR /&gt;</description>
      <pubDate>Fri, 14 Jul 2006 17:44:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nsswitch-question/m-p/4990759#M47425</guid>
      <dc:creator>Mark Fenton</dc:creator>
      <dc:date>2006-07-14T17:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: nsswitch question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nsswitch-question/m-p/4990760#M47426</link>
      <description>That's right Lynn.&lt;BR /&gt;It is for name resolution search order (among other things).&lt;BR /&gt;&lt;BR /&gt;U got it.</description>
      <pubDate>Fri, 14 Jul 2006 17:52:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nsswitch-question/m-p/4990760#M47426</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2006-07-14T17:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: nsswitch question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nsswitch-question/m-p/4990761#M47427</link>
      <description>Thanks everyone. &lt;BR /&gt;&lt;BR /&gt;Lynn</description>
      <pubDate>Wed, 19 Jul 2006 13:33:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nsswitch-question/m-p/4990761#M47427</guid>
      <dc:creator>Lynn Hsu_2</dc:creator>
      <dc:date>2006-07-19T13:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: nsswitch question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nsswitch-question/m-p/4990762#M47428</link>
      <description>Got the answer.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 19 Jul 2006 13:35:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nsswitch-question/m-p/4990762#M47428</guid>
      <dc:creator>Lynn Hsu_2</dc:creator>
      <dc:date>2006-07-19T13:35:30Z</dc:date>
    </item>
  </channel>
</rss>

