Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Using Samba
Prev Home Next

9.2.8.2 Cannot look up hostnames

Try the following:

  • In DNS:

    Run nslookup name. If this fails, look for a resolv.conf error, a downed DNS server, or a short/long name problem (see the next section). Try the following:

  • Your /etc/resolv.conf should contain one or more name-server lines, each with an IP address. These are the addresses of your DNS servers.

  • ping each of the server addresses you find. If this fails for one, suspect the machine. If it fails for each, suspect your network.

  • Retry the lookup using the full domain name (e.g., server.example.com) if you tried the short name first, or the short name if you tried the long name first. If results differ, skip to the next section.

  • In Broadcast/ WINS:

    Broadcast/ WINS does only short names such as server, (not long ones, such as server.example.com). Run nmblookup -S server. This reports everything broadcast has registered for the name. In our example, it looks like this:


Looking up status of 192.168.236.86
received 10 names
        SERVER           <00> -         M <ACTIVE> 
        SERVER           <03> -         M <ACTIVE> 
        SERVER           <1f> -         M <ACTIVE> 
        SERVER           <20> -         M <ACTIVE> 
        .._ _MSBROWSE_ _.<01> - <GROUP> M <ACTIVE> 
        MYGROUP          <00> - <GROUP> M <ACTIVE> 
        MYGROUP          <1b> -         M <ACTIVE> 
        MYGROUP          <1c> - <GROUP> M <ACTIVE> 
        MYGROUP          <1d> -         M <ACTIVE> 
        MYGROUP          <1e> - <GROUP> M <ACTIVE>
  • The required entry is SERVER <00>, which identifies server as being this machine's NetBIOS name. You should also see your workgroup mentioned one or more times. If these lines are missing, Broadcast/WINS cannot look up names and will need attention.

The numbers in angle brackets in the previous output identify NetBIOS names as being workgroups, workstations, and file users of the messenger service, master browsers, domain master browsers, domain controllers and a plethora of others. We primarily use <00> to identify machine and workgroup names and <20> to identify machines as servers. The complete list is available at https://support.microsoft.com/support/kb/articles/q163/4/09.asp.

  • In NIS:

    Try ypmatch name hosts. If this fails, NIS is down. Find out the NIS server's name by running ypwhich, and ping the machine it to see if it's accessible.

  • In NIS+:

    If you're running NIS+, try nismatch name hosts. If this fails, NIS is down. Find out the NIS server's name by running niswhich, and ping that machine to see if it's accessible.

  • In hosts files:

    Inspect /etc/hosts on the client ( C:\WINDOWS\HOSTS). Each line should have an IP number and one or more names, the primary name first, then any optional aliases. An example follows:


        127.0.0.1         localhost
        192.168.236.1     dns.svc.example.com 
        192.168.236.10    client.example.com client 
        192.168.236.11    backup.example.com loghost 
        192.168.236.86    server.example.com server 
        192.168.236.254   router.svc.example.com 
  • On Unix, localhost should always be 127.0.0.1, although it may be just an alias for a hostname on the PC. On the client, check that there are no #XXX directives at the ends of the lines; these are LAN Manager/NetBIOS directives, and should appear only in LMHOSTS files ( C:\WINDOWS\LMHOSTS).

  • In LMHOSTS files:

    This file is a local source for LAN Manager (NetBIOS) names. It has a format very similar to /etc/hosts files, but does not support long-form domain names (e.g., server.example.com), and may have a number of optional #XXX directives following the names. Note there usually is a lmhosts.sam (for sample) file in C:\WINDOWS, but it's not used unless renamed to C:\WINDOWS\LMHOSTS.

Using Samba
Prev Home Next

 
 
  Published under the terms of the Creative Commons License Design by Interspire