~ubuntu-branches/ubuntu/oneiric/samba/oneiric-security

« back to all changes in this revision

Viewing changes to docs/htmldocs/Samba-HOWTO-Collection/integrate-ms-networks.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-07-21 17:53:23 UTC
  • mfrom: (0.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050721175323-m3oh6aoigywohfnq
Tags: 3.0.14a-6ubuntu1
Resynchronise with Debian, resolving merge conflicts (#12360)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter�26.�Integrating MS Windows Networks with Samba</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.64.1"><link rel="home" href="index.html" title="The Official Samba-3 HOWTO and Reference Guide"><link rel="up" href="optional.html" title="Part�III.�Advanced Configuration"><link rel="previous" href="pam.html" title="Chapter�25.�PAM-Based Distributed Authentication"><link rel="next" href="unicode.html" title="Chapter�27.�Unicode/Charsets"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter�26.�Integrating MS Windows Networks with Samba</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pam.html">Prev</a>�</td><th width="60%" align="center">Part�III.�Advanced Configuration</th><td width="20%" align="right">�<a accesskey="n" href="unicode.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="integrate-ms-networks"></a>Chapter�26.�Integrating MS Windows Networks with Samba</h2></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><tt class="email">&lt;<a href="mailto:jht@samba.org">jht@samba.org</a>&gt;</tt></p></div></div></div></div><div><p class="pubdate"> (Jan 01 2001) </p></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="integrate-ms-networks.html#id2585838">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="integrate-ms-networks.html#id2585859">Background Information</a></span></dt><dt><span class="sect1"><a href="integrate-ms-networks.html#id2585912">Name Resolution in a Pure UNIX/Linux World</a></span></dt><dd><dl><dt><span class="sect2"><a href="integrate-ms-networks.html#id2585958">/etc/hosts</a></span></dt><dt><span class="sect2"><a href="integrate-ms-networks.html#id2586090">/etc/resolv.conf</a></span></dt><dt><span class="sect2"><a href="integrate-ms-networks.html#id2586126">/etc/host.conf</a></span></dt><dt><span class="sect2"><a href="integrate-ms-networks.html#id2586179">/etc/nsswitch.conf</a></span></dt></dl></dd><dt><span class="sect1"><a href="integrate-ms-networks.html#id2586279">Name Resolution as Used within MS Windows Networking</a></span></dt><dd><dl><dt><span class="sect2"><a href="integrate-ms-networks.html#id2586593">The NetBIOS Name Cache</a></span></dt><dt><span class="sect2"><a href="integrate-ms-networks.html#id2586648">The LMHOSTS File</a></span></dt><dt><span class="sect2"><a href="integrate-ms-networks.html#id2586824">HOSTS File</a></span></dt><dt><span class="sect2"><a href="integrate-ms-networks.html#id2586852">DNS Lookup</a></span></dt><dt><span class="sect2"><a href="integrate-ms-networks.html#id2586879">WINS Lookup</a></span></dt></dl></dd><dt><span class="sect1"><a href="integrate-ms-networks.html#id2587003">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="integrate-ms-networks.html#id2587016">Pinging Works Only in One Way</a></span></dt><dt><span class="sect2"><a href="integrate-ms-networks.html#id2587053">Very Slow Network Connections</a></span></dt><dt><span class="sect2"><a href="integrate-ms-networks.html#id2587095">Samba Server Name Change Problem</a></span></dt></dl></dd></dl></div><p>
2
 
<a class="indexterm" name="id2585809"></a>
 
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter�27.�Integrating MS Windows Networks with Samba</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.66.1"><link rel="start" href="index.html" title="The Official Samba-3 HOWTO and Reference Guide"><link rel="up" href="optional.html" title="Part�III.�Advanced Configuration"><link rel="prev" href="pam.html" title="Chapter�26.�PAM-Based Distributed Authentication"><link rel="next" href="unicode.html" title="Chapter�28.�Unicode/Charsets"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter�27.�Integrating MS Windows Networks with Samba</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pam.html">Prev</a>�</td><th width="60%" align="center">Part�III.�Advanced Configuration</th><td width="20%" align="right">�<a accesskey="n" href="unicode.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="integrate-ms-networks"></a>Chapter�27.�Integrating MS Windows Networks with Samba</h2></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><tt class="email">&lt;<a href="mailto:jht@samba.org">jht@samba.org</a>&gt;</tt></p></div></div></div></div><div><p class="pubdate"> (Jan 01 2001) </p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="integrate-ms-networks.html#id2606912">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="integrate-ms-networks.html#id2606932">Background Information</a></span></dt><dt><span class="sect1"><a href="integrate-ms-networks.html#id2606986">Name Resolution in a Pure UNIX/Linux World</a></span></dt><dd><dl><dt><span class="sect2"><a href="integrate-ms-networks.html#id2607031"><tt class="filename">/etc/hosts</tt></a></span></dt><dt><span class="sect2"><a href="integrate-ms-networks.html#id2607163"><tt class="filename">/etc/resolv.conf</tt></a></span></dt><dt><span class="sect2"><a href="integrate-ms-networks.html#id2607199"><tt class="filename">/etc/host.conf</tt></a></span></dt><dt><span class="sect2"><a href="integrate-ms-networks.html#id2607253"><tt class="filename">/etc/nsswitch.conf</tt></a></span></dt></dl></dd><dt><span class="sect1"><a href="integrate-ms-networks.html#id2607352">Name Resolution as Used within MS Windows Networking</a></span></dt><dd><dl><dt><span class="sect2"><a href="integrate-ms-networks.html#id2607666">The NetBIOS Name Cache</a></span></dt><dt><span class="sect2"><a href="integrate-ms-networks.html#id2607721">The LMHOSTS File</a></span></dt><dt><span class="sect2"><a href="integrate-ms-networks.html#id2607934">HOSTS File</a></span></dt><dt><span class="sect2"><a href="integrate-ms-networks.html#id2607962">DNS Lookup</a></span></dt><dt><span class="sect2"><a href="integrate-ms-networks.html#id2608000">WINS Lookup</a></span></dt></dl></dd><dt><span class="sect1"><a href="integrate-ms-networks.html#id2608123">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="integrate-ms-networks.html#id2608136">Pinging Works Only in One Way</a></span></dt><dt><span class="sect2"><a href="integrate-ms-networks.html#id2608172">Very Slow Network Connections</a></span></dt><dt><span class="sect2"><a href="integrate-ms-networks.html#id2608214">Samba Server Name Change Problem</a></span></dt></dl></dd></dl></div><p>
 
2
<a class="indexterm" name="id2606883"></a>
3
3
This section deals with NetBIOS over TCP/IP name to IP address resolution. If
4
4
your MS Windows clients are not configured to use NetBIOS over TCP/IP, then this
5
5
section does not apply to your installation. If your installation
11
11
to not run NetBEUI at all. Note also there is no such thing as
12
12
NetBEUI over TCP/IP  the existence of such a protocol is a complete
13
13
and utter misapprehension.
14
 
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2585838"></a>Features and Benefits</h2></div></div><div></div></div><p>
 
14
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2606912"></a>Features and Benefits</h2></div></div></div><p>
15
15
Many MS Windows network administrators have never been exposed to basic TCP/IP
16
16
networking as it is implemented in a UNIX/Linux operating system. Likewise, many UNIX and
17
17
Linux administrators have not been exposed to the intricacies of MS Windows TCP/IP-based
19
19
</p><p>
20
20
This chapter gives a short introduction to the basics of how a name can be resolved to 
21
21
its IP address for each operating system environment.
22
 
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2585859"></a>Background Information</h2></div></div><div></div></div><p>
 
22
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2606932"></a>Background Information</h2></div></div></div><p>
23
23
Since the introduction of MS Windows 2000, it is possible to run MS Windows networking
24
24
without the use of NetBIOS over TCP/IP. NetBIOS over TCP/IP uses UDP port 137 for NetBIOS
25
25
name resolution and uses TCP port 139 for NetBIOS session services. When NetBIOS over
32
32
</p></div><p>
33
33
When NetBIOS over TCP/IP is disabled, the use of DNS is essential. Most installations that
34
34
disable NetBIOS over TCP/IP today use MS Active Directory Service (ADS). ADS requires
35
 
<a class="indexterm" name="id2585890"></a>
 
35
<a class="indexterm" name="id2606964"></a>
36
36
Dynamic DNS with Service Resource Records (SRV RR) and with Incremental Zone Transfers (IXFR).
37
 
<a class="indexterm" name="id2585901"></a>
 
37
<a class="indexterm" name="id2606975"></a>
38
38
Use of DHCP with ADS is recommended as a further means of maintaining central control
39
39
over the client workstation network configuration.
40
 
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2585912"></a>Name Resolution in a Pure UNIX/Linux World</h2></div></div><div></div></div><p>
 
40
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2606986"></a>Name Resolution in a Pure UNIX/Linux World</h2></div></div></div><p>
41
41
The key configuration files covered in this section are:
42
 
</p><div class="itemizedlist"><ul type="disc"><li><p><tt class="filename">/etc/hosts</tt></p></li><li><p><tt class="filename">/etc/resolv.conf</tt></p></li><li><p><tt class="filename">/etc/host.conf</tt></p></li><li><p><tt class="filename">/etc/nsswitch.conf</tt></p></li></ul></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2585958"></a><tt class="filename">/etc/hosts</tt></h3></div></div><div></div></div><p>
 
42
</p><div class="itemizedlist"><ul type="disc"><li><p><tt class="filename">/etc/hosts</tt></p></li><li><p><tt class="filename">/etc/resolv.conf</tt></p></li><li><p><tt class="filename">/etc/host.conf</tt></p></li><li><p><tt class="filename">/etc/nsswitch.conf</tt></p></li></ul></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2607031"></a><tt class="filename">/etc/hosts</tt></h3></div></div></div><p>
43
43
This file contains a static list of IP addresses and names.
44
44
</p><pre class="programlisting">
45
45
127.0.0.1       localhost localhost.localdomain
55
55
32 bits in length and are typically presented as four (4) decimal 
56
56
numbers that are separated by a dot (or period). For example, 168.192.1.1.
57
57
</p><p>
58
 
<a class="indexterm" name="id2586002"></a>
 
58
<a class="indexterm" name="id2607075"></a>
59
59
MAC Addresses use 48 bits (or 6 bytes) and are typically represented 
60
60
as two-digit hexadecimal numbers separated by colons: 40:8e:0a:12:34:56.
61
61
</p><p>
89
89
contain the MAC address and the primary IP address for each 
90
90
interface.
91
91
</p><p>
92
 
<a class="indexterm" name="id2586068"></a>
 
92
<a class="indexterm" name="id2607142"></a>
93
93
The <tt class="filename">/etc/hosts</tt> file is foundational to all 
94
94
UNIX/Linux TCP/IP installations and as a minimum will contain 
95
95
the localhost and local network interface IP addresses and the 
97
97
This file helps to prime the pump so a basic level of name 
98
98
resolution can exist before any other method of name resolution 
99
99
becomes available.
100
 
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2586090"></a><tt class="filename">/etc/resolv.conf</tt></h3></div></div><div></div></div><p>
 
100
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2607163"></a><tt class="filename">/etc/resolv.conf</tt></h3></div></div></div><p>
101
101
This file tells the name resolution libraries:
102
102
</p><div class="itemizedlist"><ul type="disc"><li><p>The name of the domain to which the machine 
103
103
        belongs.
107
107
        </p></li><li><p>The name or IP address of available Domain 
108
108
        Name Servers that may be asked to perform name-to-address 
109
109
        translation lookups.
110
 
        </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2586126"></a><tt class="filename">/etc/host.conf</tt></h3></div></div><div></div></div><p>
111
 
<a class="indexterm" name="id2586137"></a>
 
110
        </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2607199"></a><tt class="filename">/etc/host.conf</tt></h3></div></div></div><p>
 
111
<a class="indexterm" name="id2607210"></a>
112
112
<tt class="filename">/etc/host.conf</tt> is the primary means by 
113
113
which the setting in <tt class="filename">/etc/resolv.conf</tt> may be effected. It is a 
114
114
critical configuration file. This file controls the order by 
119
119
</pre><p>
120
120
then both addresses should be returned. Please refer to the 
121
121
man page for <tt class="filename">host.conf</tt> for further details.
122
 
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2586179"></a><tt class="filename">/etc/nsswitch.conf</tt></h3></div></div><div></div></div><p>
123
 
<a class="indexterm" name="id2586190"></a>
 
122
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2607253"></a><tt class="filename">/etc/nsswitch.conf</tt></h3></div></div></div><p>
 
123
<a class="indexterm" name="id2607264"></a>
124
124
This file controls the actual name resolution targets. The 
125
125
file typically has resolver object specifications as follows:
126
126
</p><pre class="programlisting">
152
152
sent, TCP/IP networks are silent. All TCP/IP communications assume a 
153
153
principal of speaking only when necessary.
154
154
</p><p>
155
 
<a class="indexterm" name="id2586229"></a>
 
155
<a class="indexterm" name="id2607302"></a>
156
156
Starting with version 2.2.0, Samba has Linux support for extensions to 
157
157
the name service switch infrastructure so Linux clients will 
158
158
be able to obtain resolution of MS Windows NetBIOS names to IP 
165
165
will be possible to ping any MS Windows machine by its NetBIOS 
166
166
machine name, as long as that machine is within the workgroup to 
167
167
which both the Samba machine and the MS Windows machine belong.
168
 
</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2586279"></a>Name Resolution as Used within MS Windows Networking</h2></div></div><div></div></div><p>
 
168
</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2607352"></a>Name Resolution as Used within MS Windows Networking</h2></div></div></div><p>
169
169
MS Windows networking is predicated about the name each machine 
170
170
is given. This name is known variously (and inconsistently) as 
171
171
the &#8220;<span class="quote"><span class="emphasis"><em>computer name,</em></span></span>&#8221; &#8220;<span class="quote"><span class="emphasis"><em>machine name,</em></span></span>&#8221; &#8220;<span class="quote"><span class="emphasis"><em>networking name,</em></span></span>&#8221; &#8220;<span class="quote"><span class="emphasis"><em>netbios name,</em></span></span>&#8221; 
179
179
name is, therefore, registered for each service type that is provided by 
180
180
the client/server.
181
181
</p><p>
182
 
<a href="integrate-ms-networks.html#uniqnetbiosnames" title="Table�26.1.�Unique NetBIOS Names">Unique NetBIOS Names</a> and <a href="integrate-ms-networks.html#netbiosnamesgrp" title="Table�26.2.�Group Names">Group Names</a> tables 
 
182
<a href="integrate-ms-networks.html#uniqnetbiosnames" title="Table�27.1.�Unique NetBIOS Names">Unique NetBIOS Names</a> and <a href="integrate-ms-networks.html#netbiosnamesgrp" title="Table�27.2.�Group Names">Group Names</a> tables 
183
183
list typical NetBIOS name/service type registrations.
184
 
</p><div class="table"><a name="uniqnetbiosnames"></a><p class="title"><b>Table�26.1.�Unique NetBIOS Names</b></p><table summary="Unique NetBIOS Names" border="1"><colgroup><col align="left"><col align="justify"></colgroup><tbody><tr><td align="left">MACHINENAME&lt;00&gt;</td><td align="justify">Server Service is running on MACHINENAME</td></tr><tr><td align="left">MACHINENAME&lt;03&gt;</td><td align="justify">Generic Machine Name (NetBIOS name)</td></tr><tr><td align="left">MACHINENAME&lt;20&gt;</td><td align="justify">LanMan Server service is running on MACHINENAME</td></tr><tr><td align="left">WORKGROUP&lt;1b&gt;</td><td align="justify">Domain Master Browser</td></tr></tbody></table></div><div class="table"><a name="netbiosnamesgrp"></a><p class="title"><b>Table�26.2.�Group Names</b></p><table summary="Group Names" border="1"><colgroup><col align="left"><col align="justify"></colgroup><tbody><tr><td align="left">WORKGROUP&lt;03&gt;</td><td align="justify">Generic Name registered by all members of WORKGROUP</td></tr><tr><td align="left">WORKGROUP&lt;1c&gt;</td><td align="justify">Domain Controllers / Netlogon Servers</td></tr><tr><td align="left">WORKGROUP&lt;1d&gt;</td><td align="justify">Local Master Browsers</td></tr><tr><td align="left">WORKGROUP&lt;1e&gt;</td><td align="justify">Browser Election Service</td></tr></tbody></table></div><p>
185
 
<a class="indexterm" name="id2586486"></a>
 
184
</p><div class="table"><a name="uniqnetbiosnames"></a><p class="title"><b>Table�27.1.�Unique NetBIOS Names</b></p><table summary="Unique NetBIOS Names" border="1"><colgroup><col align="left"><col align="justify"></colgroup><tbody><tr><td align="left">MACHINENAME&lt;00&gt;</td><td align="justify">Server Service is running on MACHINENAME</td></tr><tr><td align="left">MACHINENAME&lt;03&gt;</td><td align="justify">Generic Machine Name (NetBIOS name)</td></tr><tr><td align="left">MACHINENAME&lt;20&gt;</td><td align="justify">LanMan Server service is running on MACHINENAME</td></tr><tr><td align="left">WORKGROUP&lt;1b&gt;</td><td align="justify">Domain Master Browser</td></tr></tbody></table></div><div class="table"><a name="netbiosnamesgrp"></a><p class="title"><b>Table�27.2.�Group Names</b></p><table summary="Group Names" border="1"><colgroup><col align="left"><col align="justify"></colgroup><tbody><tr><td align="left">WORKGROUP&lt;03&gt;</td><td align="justify">Generic Name registered by all members of WORKGROUP</td></tr><tr><td align="left">WORKGROUP&lt;1c&gt;</td><td align="justify">Domain Controllers / Netlogon Servers</td></tr><tr><td align="left">WORKGROUP&lt;1d&gt;</td><td align="justify">Local Master Browsers</td></tr><tr><td align="left">WORKGROUP&lt;1e&gt;</td><td align="justify">Browser Election Service</td></tr></tbody></table></div><p>
 
185
<a class="indexterm" name="id2607560"></a>
186
186
It should be noted that all NetBIOS machines register their own 
187
187
names as per the above. This is in vast contrast to TCP/IP 
188
188
installations where traditionally the system administrator will 
189
189
determine in the <tt class="filename">/etc/hosts</tt> or in the DNS database what names 
190
190
are associated with each IP address.
191
191
</p><p>
192
 
<a class="indexterm" name="id2586507"></a>
 
192
<a class="indexterm" name="id2607580"></a>
193
193
One further point of clarification should be noted. The <tt class="filename">/etc/hosts</tt> 
194
194
file and the DNS records do not provide the NetBIOS name type information 
195
195
that MS Windows clients depend on to locate the type of service that may 
227
227
MS Windows machines use a complex array of name resolution mechanisms. 
228
228
Since we are primarily concerned with TCP/IP, this demonstration is 
229
229
limited to this area.
230
 
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2586593"></a>The NetBIOS Name Cache</h3></div></div><div></div></div><p>
 
230
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2607666"></a>The NetBIOS Name Cache</h3></div></div></div><p>
231
231
All MS Windows machines employ an in-memory buffer in which is 
232
232
stored the NetBIOS names and IP addresses for all external 
233
233
machines that machine has communicated with over the 
242
242
lookup will succeed, but the machine cannot respond. This can be 
243
243
frustrating for users but is a characteristic of the protocol.
244
244
</p><p>
245
 
<a class="indexterm" name="id2586620"></a>
246
 
<a class="indexterm" name="id2586627"></a>
 
245
<a class="indexterm" name="id2607693"></a>
 
246
<a class="indexterm" name="id2607699"></a>
247
247
The MS Windows utility that allows examination of the NetBIOS 
248
248
name cache is called &#8220;<span class="quote"><span class="emphasis"><em>nbtstat</em></span></span>&#8221;. The Samba equivalent of this 
249
249
is called <span><b class="command">nmblookup</b></span>.
250
 
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2586648"></a>The LMHOSTS File</h3></div></div><div></div></div><p>
251
 
<a class="indexterm" name="id2586656"></a>
 
250
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2607721"></a>The LMHOSTS File</h3></div></div></div><p>
 
251
<a class="indexterm" name="id2607729"></a>
252
252
This file is usually located in MS Windows NT 4.0 or Windows 200x/XP in the directory
253
 
<tt class="filename">C:\WINNT\SYSTEM32\DRIVERS\ETC</tt> and contains the IP Address
 
253
<tt class="filename">%SystemRoot%\SYSTEM32\DRIVERS\ETC</tt> and contains the IP Address
254
254
and the machine name in matched pairs. The <tt class="filename">LMHOSTS</tt> file
255
255
performs NetBIOS name to IP address mapping.
256
256
</p><p>
333
333
# so keeping the number of comments to a minimum will improve performance.
334
334
# Therefore it is not advisable to simply add lmhosts file entries onto the
335
335
# end of this file.
336
 
</pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2586824"></a>HOSTS File</h3></div></div><div></div></div><p>
 
336
</pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2607934"></a>HOSTS File</h3></div></div></div><p>
337
337
This file is usually located in MS Windows NT 4.0 or Windows 200x/XP in 
338
 
the directory <tt class="filename">C:\WINNT\SYSTEM32\DRIVERS\ETC</tt> and contains 
 
338
the directory <tt class="filename">%SystemRoot%\SYSTEM32\DRIVERS\ETC</tt> and contains 
339
339
the IP Address and the IP hostname in matched pairs. It can be 
340
340
used by the name resolution infrastructure in MS Windows, depending 
341
341
on how the TCP/IP environment is configured. This file is in 
342
342
every way the equivalent of the UNIX/Linux <tt class="filename">/etc/hosts</tt> file.
343
 
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2586852"></a>DNS Lookup</h3></div></div><div></div></div><p>
344
 
<a class="indexterm" name="id2586860"></a>
 
343
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2607962"></a>DNS Lookup</h3></div></div></div><p>
 
344
<a class="indexterm" name="id2607970"></a>
345
345
This capability is configured in the TCP/IP setup area in the network 
346
346
configuration facility. If enabled, an elaborate name resolution sequence 
347
347
is followed, the precise nature of which is dependant on how the NetBIOS 
352
352
Node Type 8, then a NetBIOS Unicast (over UDP Unicast) is sent to the 
353
353
WINS Server to obtain a lookup before DNS, HOSTS, LMHOSTS, or broadcast 
354
354
lookup is used.
355
 
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2586879"></a>WINS Lookup</h3></div></div><div></div></div><p>
356
 
<a class="indexterm" name="id2586887"></a>
 
355
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2608000"></a>WINS Lookup</h3></div></div></div><p>
 
356
<a class="indexterm" name="id2608008"></a>
357
357
A WINS (Windows Internet Name Server) service is the equivalent of the 
358
358
rfc1001/1002 specified NBNS (NetBIOS Name Server). A WINS server stores 
359
359
the names and IP addresses that are registered by a Windows client 
361
361
</p><p>
362
362
To configure Samba to be a WINS server, the following parameter needs 
363
363
to be added to the <tt class="filename">smb.conf</tt> file:
364
 
</p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id2586917"></a><i class="parameter"><tt>
 
364
</p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id2608038"></a><i class="parameter"><tt>
365
365
                                        
366
366
                                wins support = Yes</tt></i></td></tr></table><p>
367
367
To configure Samba to use a WINS server, the following parameters are 
368
368
needed in the <tt class="filename">smb.conf</tt> file:
369
 
</p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id2586950"></a><i class="parameter"><tt>
 
369
</p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id2608071"></a><i class="parameter"><tt>
370
370
                                        
371
 
                                wins support = No</tt></i></td></tr><tr><td><a class="indexterm" name="id2586966"></a><i class="parameter"><tt>
 
371
                                wins support = No</tt></i></td></tr><tr><td><a class="indexterm" name="id2608086"></a><i class="parameter"><tt>
372
372
                                        
373
373
                                wins server = xxx.xxx.xxx.xxx</tt></i></td></tr></table><p>
374
374
where <i class="replaceable"><tt>xxx.xxx.xxx.xxx</tt></i> is the IP address 
375
375
of the WINS server.
376
376
</p><p>For information about setting up Samba as a WINS server, read 
377
 
<a href="NetworkBrowsing.html" title="Chapter�9.�Network Browsing">Network Browsing</a>.</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2587003"></a>Common Errors</h2></div></div><div></div></div><p>
 
377
<a href="NetworkBrowsing.html" title="Chapter�9.�Network Browsing">Network Browsing</a>.</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2608123"></a>Common Errors</h2></div></div></div><p>
378
378
TCP/IP network configuration problems find every network administrator sooner or later.
379
379
The cause can be anything from keyboard mishaps, forgetfulness, simple mistakes, and
380
380
carelessness. Of course, no one is ever deliberately careless!
381
 
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2587016"></a>Pinging Works Only in One Way</h3></div></div><div></div></div><p>
 
381
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2608136"></a>Pinging Works Only in One Way</h3></div></div></div><p>
382
382
        &#8220;<span class="quote"><span class="emphasis"><em>I can ping my Samba server from Windows, but I cannot ping my Windows
383
383
        machine from the Samba server.</em></span></span>&#8221;
384
384
        </p><p>
388
388
        </p><p>
389
389
        Due to inconsistent netmasks, the Windows machine was on network 192.168.1.0/24, while
390
390
        the Samba server was on network 192.168.1.128/25  logically a different network.
391
 
        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2587053"></a>Very Slow Network Connections</h3></div></div><div></div></div><p>
 
391
        </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2608172"></a>Very Slow Network Connections</h3></div></div></div><p>
392
392
        A common cause of slow network response includes:
393
393
        </p><div class="itemizedlist"><ul type="disc"><li><p>Client is configured to use DNS and the DNS server is down.</p></li><li><p>Client is configured to use remote DNS server, but the
394
 
                remote connection is down.</p></li><li><p>Client is configured to use a WINS server, but there is no WINS server.</p></li><li><p>Client is not configured to use a WINS server, but there is a WINS server.</p></li><li><p>Firewall is filtering our DNS or WINS traffic.</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2587095"></a>Samba Server Name Change Problem</h3></div></div><div></div></div><p>
 
394
                remote connection is down.</p></li><li><p>Client is configured to use a WINS server, but there is no WINS server.</p></li><li><p>Client is not configured to use a WINS server, but there is a WINS server.</p></li><li><p>Firewall is filtering our DNS or WINS traffic.</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2608214"></a>Samba Server Name Change Problem</h3></div></div></div><p>
395
395
        &#8220;<span class="quote"><span class="emphasis"><em>The name of the Samba server was changed, Samba was restarted, Samba server cannot be
396
396
        ping-ed by new name from MS Windows NT4 Workstation, but it does still respond to ping using
397
397
        the old name. Why?</em></span></span>&#8221;
431
431
        The first listing shows the contents of the Local Name Table (i.e., Identity information on
432
432
        the MS Windows workstation) and the second shows the NetBIOS name in the NetBIOS name cache.
433
433
        The name cache contains the remote machines known to this workstation.
434
 
        </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pam.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="optional.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="unicode.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter�25.�PAM-Based Distributed Authentication�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Chapter�27.�Unicode/Charsets</td></tr></table></div></body></html>
 
434
        </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pam.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="optional.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="unicode.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter�26.�PAM-Based Distributed Authentication�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Chapter�28.�Unicode/Charsets</td></tr></table></div></body></html>