Uploaded image for project: 'Product Technical Learning'
  1. Product Technical Learning
  2. PTL-12155

RH199 : ch13s07 : Confusing statement regarding hostname resolution for getent hosts

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • 12
    • ROLE
    • en-US (English)

      Please fill in the following information:


      URL:  https://role.rhu.redhat.com/rol-rhu/app/courses/rh199-9.0/pages/ch13s07 
      Reporter RHNID: mwhitehe@redhat.com
      Section Title:             Configure Hostnames and Name Resolution                                                            

      Issue description: In RH11-9.0 in section ch13s07 it says the following: "The getent hosts hostname command tests hostname resolution with the /etc/hosts file. If an entry is not found in the /etc/hosts file, then the stub resolver uses a DNS name server to look up the hostname. The /etc/resolv.conf file controls how this query is performed:" The last sentence is wrong, Wrong, WRONG. The correct statement is "The /etc/nsswitch.conf file controls how this query is performed". The "getent hosts hostname" will only work if nsswitch.conf is correctly configured with at least "hosts: files" enabled. If not, no amount of editing /etc/resolv.conf can make it work. If it should continue resolution with DNS second, the configuration would be "hosts: files dns". 

       

      Steps to reproduce:

       

      Workaround:

       

      Expected result:

              shasingh01 Shashi Singh
              chetan-rhls Chetan Tiwary
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: