1 <chapter label="3" id="SAMBA-CH-3">
2 <title>Configuring Windows Clients</title>
8 <indexterm id="ch03-idx-947918-0" class="startofrange"><primary>Windows clients</primary><secondary>configuring</secondary></indexterm>
9 <indexterm id="ch03-idx-947918-1" class="startofrange"><primary>configuring Windows clients</primary></indexterm>You'll be glad to know that configuring Windows to use your new Samba server is quite simple. SMB is Microsoft's native language for resource sharing on a local area network, so much of the installation and setup on the Windows client side has been taken care of already. The primary issues that we will cover in this chapter involve communication and coordination between Windows and Unix, two completely different operating systems.</para>
12 <para>Samba uses TCP/IP to talk to its clients on the network. If you aren't already using TCP/IP on your Windows computers, this chapter will show you how to install it. Then you'll need to configure your Windows machines to operate on a TCP/IP network. Once these two requirements have been taken care of, we can show how to access a shared disk on the Samba server.</para>
15 <para>This chapter is divided into three sections. The first section covers setting up Windows 95/98 computers while the second covers Windows NT 4.0 machines. The final section provides some prerequisite information on how SMB connections are made from Windows clients and servers, which is useful as we move into the later chapters of the book.</para>
27 <sect1 role="" label="3.1" id="ch03-55770">
28 <title>Setting Up Windows 95/98 Computers</title>
32 <indexterm id="ch03-idx-947927-0" class="startofrange"><primary>Windows clients</primary><secondary>configuring</secondary><tertiary>Windows95/98 computers</tertiary></indexterm>
33 <indexterm id="ch03-idx-947927-1" class="startofrange"><primary>configuring Windows clients</primary><secondary>Windows 95/98 computers</secondary></indexterm>Unfortunately, Windows 95/98 wasn't designed for a PC to have more than one user; that concept is more inherent to a Unix operating system or Windows NT. However, <indexterm id="ch03-idx-947953-0"><primary>Windows 95/98</primary><secondary>multiple users, support for</secondary></indexterm>Windows 95/98 does have <emphasis>limited</emphasis> support for multiple users: if you tell it, the operating system will keep a separate <indexterm id="ch03-idx-947955-0"><primary>user profiles (Windows 95/98)</primary></indexterm>profile (desktop layout) and password file for each user. This is a far cry from true multiuser security. In other words, Windows 95/98 won't try to keep one user from destroying the work of another on the local hard drive like Unix, but profiles are a place to start.</para>
36 <sect2 role="" label="3.1.1" id="ch03-SECT-1.1">
37 <title>Accounts and Passwords</title>
41 <indexterm id="ch03-idx-947956-0" class="startofrange"><primary>accounts</primary></indexterm>
42 <indexterm id="ch03-idx-947956-1" class="startofrange"><primary>passwords</primary><secondary>Windows 95/98</secondary></indexterm>
43 <indexterm id="ch03-idx-947956-2" class="startofrange"><primary>usernames</primary><secondary>Windows 95/98</secondary></indexterm>The first thing we need to do is to tell Windows to keep user profiles separate, and to collect usernames and passwords to authenticate anyone trying to access a Samba share. We do so via the <indexterm id="ch03-idx-947957-0"><primary>Password settings (Windows 95/98)</primary></indexterm>Password settings in the Control Panel. If you are not familiar with the Windows Control Panel, you can access it by choosing the Settings menu item from the pop-up menu of the Start button in the lower-left corner of the screen. Alternatively, you'll find it as a folder under the icon in the upper-left corner that represents your computer and is typically labeled <indexterm id="ch03-idx-947958-0"><primary>My Computer (Windows 95/98)</primary></indexterm>My Computer.</para>
46 <para>After selecting the Passwords icon in the Control Panel, click on the User Profiles tab on the far right. You should see the dialog box shown in <link linkend="ch03-84319">Figure 3.1</link>. Then click the lower of the two radio buttons that starts "Users can customize their preferences...." This causes Windows to store a separate profile for each user, and saves the username and password you provide, which it will use later when it connects to an SMB/CIFS server. Finally, check <emphasis>both</emphasis> the options under the User Profile Settings border, as shown in the figure.</para>
49 <figure label="3.1" id="ch03-84319">
50 <title>The Passwords Properties panel</title>
52 <graphic width="502" depth="289" fileref="figs/sam.0301.gif"></graphic>
55 <para>The next step is to select the Change Passwords tab on the left side of the dialog box. In order for Samba to allow you access to its shares, the username and password you give to Windows must match the account and password on the Samba server. If you don't have this tab in your dialog box, don't worry; it's probably because you haven't given yourself a Windows username and password yet. Simply click the OK button at the bottom and respond Yes when Windows asks to reboot. Then, skip down to <link linkend="ch03-57581">Section 3.1.1.2</link>.</para>
58 <sect3 role="" label="3.1.1.1" id="ch03-SECT-1.1.1">
59 <title>Changing the Windows password</title>
63 <indexterm id="ch03-idx-947966-0"><primary>passwords</primary><secondary>Windows 95/98</secondary><tertiary>changing</tertiary></indexterm>After selecting the Change Passwords tab, the dialog box in <link linkend="ch03-26778">Figure 3.2</link> will appear.</para>
66 <figure label="3.2" id="ch03-26778">
67 <title>The Change Passwords tab</title>
69 <graphic width="502" depth="306" fileref="figs/sam.0302.gif"></graphic>
72 <para>Select the Change Windows Password button. The <indexterm id="ch03-idx-947967-0"><primary>Change Windows Password dialog box</primary></indexterm>Change Windows Password dialog box should appear, as shown in <link linkend="ch03-97002">Figure 3.3</link>. From here, you can change your password to match the password of the account on the Samba server through which you intend to log in.</para>
75 <figure label="3.3" id="ch03-97002">
76 <title>The Change Windows Password dialog box</title>
78 <graphic width="502" depth="135" fileref="figs/sam.0303.gif"></graphic>
84 <sect3 role="" label="3.1.1.2" id="ch03-57581">
85 <title>Logging in for the first time</title>
89 <indexterm id="ch03-idx-947969-0"><primary>log files/logging</primary><secondary>in for the first time (Samba)</secondary></indexterm>
90 <indexterm id="ch03-idx-947969-1"><primary>Samba</primary><secondary>logging in for the first time</secondary></indexterm>If you didn't have a Change Passwords tab in the Passwords Properties window, then after Windows has finished rebooting, it will ask you to log in with a username and a password. Give yourself the same username and password that you have on the Samba server. After confirming your new username and password, or if you already have one, Windows should ask you if you want to have a <indexterm id="ch03-idx-947970-0"><primary>profiles</primary><secondary>creating</secondary></indexterm>profile, using the dialog shown in <link linkend="ch03-48947">Figure 3.4</link>. <indexterm id="ch03-idx-947961-0" class="endofrange" startref="ch03-idx-947956-0"/>
91 <indexterm id="ch03-idx-947961-1" class="endofrange" startref="ch03-idx-947956-1"/>
92 <indexterm id="ch03-idx-947961-2" class="endofrange" startref="ch03-idx-947956-2"/></para>
95 <figure label="3.4" id="ch03-48947">
96 <title>Windows Networking profiles</title>
98 <graphic width="502" depth="121" fileref="figs/sam.0304.gif"></graphic>
101 <para>Answer Yes, upon which Windows will create a separate profile and password file for you and save a copy of your password in the file. Now when you connect to Samba, Windows will send its password, which will be used to authenticate you for each share. We won't worry about profiles for the moment; we'll cover them in <link linkend="SAMBA-CH-6">Chapter 6</link>. We should point out, however, that there is a small security risk: someone can steal the <indexterm id="ch03-idx-947972-0"><primary>password file, security and</primary></indexterm>password file and decrypt the passwords because it's weakly encrypted. Unfortunately, there isn't a solution to this with Windows 95/98. In Windows 2000 (NT 5.0), the password encryption should be replaced with a much better algorithm.</para>
109 <sect2 role="" label="3.1.2" id="ch03-36280">
110 <title>Setting Up the Network</title>
114 <indexterm id="ch03-idx-947983-0" class="startofrange"><primary>networking</primary><secondary>setting up</secondary></indexterm>The next thing we need to do is make sure we have the <indexterm id="ch03-idx-947973-0"><primary>TCP/IP networking protocol</primary><secondary>checking setup</secondary></indexterm>TCP/IP networking protocol set up correctly. To do this, double-click on the <indexterm id="ch03-idx-947975-0"><primary>Network icon</primary><secondary>Windows 95/98</secondary></indexterm>Network icon in the Control Panel. You should see the network configuration dialog box, as shown in <link linkend="ch03-15320">Figure 3.5</link>.</para>
117 <figure label="3.5" id="ch03-15320">
118 <title>The Windows 95/98 Network panel</title>
120 <graphic width="502" depth="371" fileref="figs/sam.0305.gif"></graphic>
123 <para>Microsoft networking works by binding specific protocols, such as IPX or TCP/IP, to a specific hardware device, such as an <indexterm id="ch03-idx-947977-0"><primary>Ethernet adaptor cards</primary></indexterm>Ethernet card or a <indexterm id="ch03-idx-948013-0"><primary>dialup connection</primary></indexterm>dialup connection. By routing a <indexterm id="ch03-idx-947976-0"><primary>protocols</primary><secondary>routed through a hardware device</secondary></indexterm>protocol through a hardware device, the machine can act as a client or server for a particular type of network. For Samba, we are interested in binding the TCP/IP protocol through a networking device, making the machine a client for Microsoft networks. Thus, when the dialog box appears, you should see at least the Client for Microsoft Networks component installed on the machine, and hopefully a networking device (preferably an Ethernet card) bound to the TCP/IP protocol. If there is only one networking hardware device, you'll see the TCP/IP protocol listed below that device. If it appears similar to <link linkend="ch03-15320">Figure 3.5</link>, the protocol is bound to the device.</para>
126 <para>You may also see <indexterm id="ch03-idx-947979-0"><primary sortas="File and Printer Sharing for Microsoft Networks">"File and Printer Sharing for Microsoft Networks"</primary></indexterm>"File and printer sharing for Microsoft Networks," which is useful. In addition, you might see <indexterm id="ch03-idx-947981-0"><primary>NetBEUI (NetBIOS Extended User Interface)</primary></indexterm>NetBEUI or <indexterm id="ch03-idx-947982-0"><primary>Novell Networking</primary></indexterm>Novell Networking, which are standard with Windows installations but undesirable when TCP/IP is running. Remove NetBEUI if you possibly can—it's unnecessary and makes debugging Windows browsing difficult. If you don't have any Novell servers on your network, you can remove Novell (IPX/SPX) as well.</para>
129 <sect3 role="" label="3.1.2.1" id="ch03-SECT-1.2.1">
130 <title>Adding TCP/IP</title>
134 <indexterm id="ch03-idx-947991-0" class="startofrange"><primary>TCP/IP networking protocol</primary><secondary>adding/configuring</secondary></indexterm>If you don't see TCP/IP listed at all, you'll need to install the protocol. If you already have TCP/IP, skip this section, and continue with <link linkend="ch03-48802">Section 3.1.3</link>, later in this chapter.</para>
137 <para>Installing TCP/IP isn't difficult since Microsoft distributes its own version of TCP/IP for free on their installation CD-ROM. You can add the protocol by clicking on the Add button below the component window. Indicate that you wish to add a specific protocol by selecting Protocol and clicking Add... on the following dialog box, which should look similar to <link linkend="ch03-24245">Figure 3.6</link>.</para>
140 <figure label="3.6" id="ch03-24245">
141 <title>Selecting a protocol to install</title>
143 <graphic width="502" depth="195" fileref="figs/sam.0306.gif"></graphic>
146 <para>After that, select the protocol TCP/IP from manufacturer Microsoft, as shown in <link linkend="ch03-50801">Figure 3.7</link>, then click OK. After doing so, you will be returned to the network dialog. Click OK there to close the dialog box, upon which Windows will install the necessary components from disk and reboot the machine.</para>
149 <figure label="3.7" id="ch03-50801">
150 <title>Selecting a protocol to install</title>
152 <graphic width="502" depth="296" fileref="figs/sam.0307.gif"></graphic>
158 <sect3 role="" label="3.1.2.2" id="ch03-SECT-1.2.2">
159 <title>Configuring TCP/IP</title>
163 <indexterm id="ch03-idx-948011-0"><primary>configuring TCP/IP networking protocol</primary></indexterm>If you have more than one networking device (for example, both an <indexterm id="ch03-idx-948014-0"><primary>Ethernet adaptor cards</primary><secondary>linking to TCP/IP networking protocol</secondary></indexterm>Ethernet card and a dialup networking <indexterm id="ch03-idx-948015-0"><primary>modem, linking to TCP/IP networking protocol</primary></indexterm>modem), each appropriate hardware device should be "linked" to the TCP/IP protocol with an arrow, as shown in <link linkend="ch03-61576">Figure 3.8</link>. Select the TCP/IP protocol linked to the networking device that will be accessing the Samba network. When it is highlighted, click the<indexterm id="ch03-idx-948019-0"><primary>Properties button (Windows 95/98)</primary></indexterm> Properties button.</para>
166 <figure label="3.8" id="ch03-61576">
167 <title>Selecting the correct TCP/IP protocol</title>
169 <graphic width="502" depth="389" fileref="figs/sam.0308.gif"></graphic>
172 <para>After doing so, the <indexterm id="ch03-idx-948028-0"><primary>TCP/IP Properties panel (Windows 95/98)</primary></indexterm>TCP/IP Properties panel for that device is displayed, as shown in <link linkend="ch03-73526">Figure 3.9</link>.</para>
175 <figure label="3.9" id="ch03-73526">
176 <title>STCP/IP Properties panel</title>
178 <graphic width="502" depth="303" fileref="figs/sam.0309.gif"></graphic>
181 <para>There are seven tabs near the top of this panel, and you will need to configure four of them:</para>
185 <listitem><para>IP address</para></listitem>
186 <listitem><para>DNS configuration</para></listitem>
187 <listitem><para>WINS configuration</para></listitem>
188 <listitem><para>Bindings</para></listitem>
194 <sect3 role="" label="3.1.2.3" id="ch03-SECT-1.2.3">
195 <title>IP Address tab </title>
198 <para>The <indexterm id="ch03-idx-948038-0"><primary>IP Address tab</primary><secondary>Windows 95/98</secondary></indexterm>
199 <indexterm id="ch03-idx-948038-1"><primary>DHCP (Dynamic Host Configuration Protocol)</primary></indexterm>IP Address tab is shown in <link linkend="ch03-73526">Figure 3.9</link>. Press the "Specify an IP address" radio button and enter the client's address and subnet <indexterm id="ch03-idx-948214-0"><primary>masks</primary><secondary>subnet</secondary></indexterm>
200 <indexterm id="ch03-idx-948214-1"><primary>subnets</primary><secondary>mask</secondary></indexterm>mask in the space provided. You or your network manager should have selected an address for the machine. The values should place the computer on the same subnet as the Samba server. For example, if the server's address is 192.168.236.86, and its network <indexterm id="ch03-idx-948217-0"><primary>masks</primary><secondary>netmasks</secondary></indexterm>
201 <indexterm id="ch03-idx-948217-1"><primary>netmasks</primary></indexterm>
202 <indexterm id="ch03-idx-948217-2"><primary>network masks</primary><see>netmasks</see></indexterm>mask 255.255.255.0, you might use address 192.168.236.10 (if it is available) for the Windows 98 computer, along with the same netmask as the server. If you already use DHCP on your network to provide IP addresses to Windows machines, select the "Obtain an IP address automatically" button.</para>
207 <sect3 role="" label="3.1.2.4" id="ch03-SECT-1.2.4">
208 <title>DNS Configuration tab</title>
212 <indexterm id="ch03-idx-948039-0"><primary>DNS Configuration tab</primary></indexterm>Domain Name Service (<indexterm id="ch03-idx-948040-0"><primary>DNS (Domain Name System)</primary></indexterm>
213 <indexterm id="ch03-idx-948040-1"><primary>Domain Name System</primary><see>DNS</see></indexterm>DNS) is responsible for translating Internet computer names such as <emphasis>hobbes.example.com</emphasis> into machine-readable IP addresses such as 192.168.236.10. There are two ways to accomplish this on a Windows 98 machine: you can specify a server to do the translation for you or you can keep a local list of name/address pairs to refer to.</para>
216 <para>Networks that are connected to the Internet typically use a server, since the hosts files required would otherwise be huge. For an unconnected LAN, the list of possible hosts is small and well-known and might be kept on a Unix machine in the <emphasis>/etc/hosts</emphasis>
217 <indexterm id="ch03-idx-948046-0"><primary sortas="etc/hosts file">/etc/hosts file</primary></indexterm> file. If you are in doubt as to whether a DNS server is being used, or what its address might be, look at the file <emphasis>/etc/resolv.conf</emphasis>
218 <indexterm id="ch03-idx-948047-0"><primary sortas="etc/resolv.conf file">/etc/resolv.conf file </primary></indexterm> on your Unix servers. Any machine using DNS will have this file, which looks like:</para>
221 <programlisting>#resolv.conf
224 nameserver 192.168.236.20</programlisting>
227 <para>In the example shown, the second <literal>nameserver</literal> line in the list contains the IP address of another machine on the local network: 192.168.236.20. It's a good candidate for a DNS server.<footnote label="1" id="ch03-pgfId-942097">
230 <para>We can disqualify the other address because every Unix machine has a localhost address of 127.0.0.1 whether it is connected to a network or not. This address is required for some system tools to operate correctly.</para>
236 <para>You must type the correct IP address of one or more DNS servers (note that you <emphasis>cannot</emphasis> use its Internet name, such as <emphasis>dns.oreilly.com</emphasis>) into the appropriate field in <link linkend="ch03-86883">Figure 3.10</link>. Be sure not to use 127.0.0.1—that will never be the correct DNS server address!</para>
239 <para>Try to select addresses on your own network. Any name servers listed in <emphasis>/etc/resolv.conf</emphasis> should work, but you'll get better performance by using a server nearby. (If you don't find <emphasis>/etc/resolv.conf</emphasis> files on your Unix machines, just disable DNS until you can find the address of at least one DNS server.) Let's assume you only have one DNS server, and its address is 192.168.236.20. Click the Enable DNS radio button, as shown in <link linkend="ch03-86883">Figure 3.10</link>, and add the server's address to the top DNS Server Search Order field.</para>
242 <figure label="3.10" id="ch03-86883">
243 <title>The DNS Configuration tab</title>
245 <graphic width="502" depth="360" fileref="figs/sam.0310.gif"></graphic>
248 <para>Also, provide the name of the Windows 95/98 machine and the Internet domain you're in. You can safely ignore the Domain Suffix Search Order field for anything related to Samba.</para>
253 <sect3 role="" label="3.1.2.5" id="ch03-SECT-1.2.5">
254 <title>WINS Configuration tab</title>
258 <indexterm id="ch03-idx-948063-0"><primary>WINS Configuration tab</primary></indexterm>WINS is the <indexterm id="ch03-idx-948065-0"><primary>WINS (Windows Internet Name Service)</primary></indexterm>
259 <indexterm id="ch03-idx-948065-1"><primary>Windows Internet Name Service</primary><see>WINS</see></indexterm>Windows Internet Name Service, its version of a <indexterm id="ch03-idx-948066-0"><primary>NetBIOS (Network Basic Input/Output System)</primary><secondary>name server (NBNS)</secondary></indexterm>NetBIOS name server. If you've enabled WINS on Samba, you must tell Windows the Samba server's address. If you are using WINS servers that are entirely Windows NT, enter each of them here as well. The dialog box shown after selecting the WINS Configuration tab is shown in <link linkend="ch03-95608">Figure 3.11</link>.</para>
262 <figure label="3.11" id="ch03-95608">
263 <title>The WINS Configuration tab</title>
265 <graphic width="502" depth="389" fileref="figs/sam.0311.gif"></graphic>
269 <para>Do <emphasis>not</emphasis> mix a Samba WINS server and a Windows NT server as a primary/backup combination in the WINS dialog. Because the two cannot replicate their databases, this will cause name resolution to perform incorrectly.</para>
273 <para>From here, select Enable WINS Resolution and enter the <indexterm id="ch03-idx-948058-0"><primary>WINS (Windows Internet Name Service)</primary><secondary>servers</secondary></indexterm>WINS server's address in the space provided, then press Add. Do not enter anything in the Scope ID field.</para>
278 <sect3 role="" label="3.1.2.6" id="ch03-SECT-1.2.6">
279 <title>Hosts files</title>
283 <indexterm id="ch03-idx-948067-0"><primary>hosts</primary><secondary>files (Windows 95/98)</secondary></indexterm>If you do not have either DNS or WINS, and you don't wish to use <indexterm id="ch03-idx-948070-0"><primary>broadcast resolution</primary></indexterm>broadcast resolution, you'll need to provide a table of IP addresses and hostnames, in the standard Unix <filename>/etc/hosts</filename> format. On a Windows machine, this goes in <indexterm id="ch03-idx-948075-0"><primary sortas="Windows/HOSTS directory">\WINDOWS\HOSTS directory</primary></indexterm>\WINDOWS\HOSTS under whichever drive you installed Windows on (typically C:\). A sample host file follows:</para>
286 <programlisting># 127.0.0.1 localhost
287 192.168.236.1 escrime.example.com escrime
288 192.168.236.2 riposte.example.com riposte
289 192.168.236.3 wizzin.example.com wizzin
290 192.168.236.4 touche.example.com touche
291 192.168.236.10 hobbes.example.com hobbes</programlisting>
294 <para>You can copy this file directly from any of your Unix machines' <emphasis>/etc/hosts</emphasis> <indexterm id="ch03-idx-948074-0"><primary sortas="etc/hosts file">/etc/hosts file</primary></indexterm>; the format is identical. However, <emphasis>you should only use hosts files in Windows as a last resort for name resolution</emphasis>
295 <indexterm id="ch03-idx-948069-0"><primary>name resolution</primary></indexterm>.</para>
300 <sect3 role="" label="3.1.2.7" id="ch03-SECT-1.2.7">
301 <title>Check the bindings</title>
304 <para>The final tab to look at is <indexterm id="ch03-idx-948076-0"><primary>Bindings tab</primary></indexterm>Bindings, as shown in <link linkend="ch03-42906">Figure 3.12</link>.</para>
307 <figure label="3.12" id="ch03-42906">
308 <title>The Bindings tab</title>
310 <graphic width="502" depth="249" fileref="figs/sam.0312.gif"></graphic>
313 <para>You should have a check beside Client for Microsoft Networks, indicating that it's using TCP/IP. If you have <indexterm id="ch03-idx-948077-0"><primary sortas="File and Printer Sharing for Microsoft Networks">"File and Printer Sharing for Microsoft Networks"</primary></indexterm>"File and printer sharing for Microsoft Networks" in the dialog, it should also be checked, as shown in the figure.<indexterm id="ch03-idx-947986-0" class="endofrange" startref="ch03-idx-947983-0"/></para>
321 <sect2 role="" label="3.1.3" id="ch03-48802">
322 <title>Setting Your Name and Workgroup </title>
326 <indexterm id="ch03-idx-948082-0"><primary>naming</primary><secondary>TCP/IP networking protocol, setting machine name for</secondary></indexterm>
327 <indexterm id="ch03-idx-948082-1"><primary>workgroups</primary><secondary>setting</secondary></indexterm>Finally, press the OK button in the TCP/IP configuration panel, and you'll be taken back to the Network Configuration screen. Then select the <indexterm id="ch03-idx-948078-0"><primary>Identification tab</primary></indexterm>Identification tab, which will take you to the dialog box shown in <link linkend="ch03-42408">Figure 3.13</link>.</para>
330 <figure label="3.13" id="ch03-42408">
331 <title>The Identification tab</title>
333 <graphic width="502" depth="285" fileref="figs/sam.0313.gif"></graphic>
336 <para>Here, for the second time, set your machine's name. This time, instead of your DNS hostname and domain, you're setting your <indexterm id="ch03-idx-948084-0"><primary>NetBIOS name</primary><secondary>setting</secondary><tertiary>Windows 95/98</tertiary></indexterm>NetBIOS name. However, it is best to make this the <emphasis>same</emphasis> as your hostname. Try not to make a <indexterm id="ch03-idx-948085-0"><primary>spelling, caution with</primary></indexterm>spelling mistake: it can be very confusing to configure a machine if TCP thinks it's <literal>fred</literal> and SMB thinks its <literal>ferd</literal> !</para>
339 <para>You also set your workgroup name here. In our case, it's SIMPLE, but if you used a different one in <link linkend="SAMBA-CH-2">Chapter 2</link>, when creating the Samba configuration file, use that here as well. Try to avoid calling it WORKGROUP or you'll be in the same workgroup as every unconfigured (or ill-configured) machine in the world.</para>
346 <sect2 role="" label="3.1.4" id="ch03-13238">
347 <title>Accessing the Samba Server</title>
351 <indexterm id="ch03-idx-948086-0"><primary>Samba server</primary><secondary>accessing</secondary></indexterm>
352 <indexterm id="ch03-idx-948086-1"><primary>accessing Samba server</primary></indexterm>Click on the OK button to complete the configuration; you will need to reboot in order for your changes to take effect.</para>
355 <para>Now for the big moment. Your Samba server is running, and you have set up your Windows 95/98 client to communicate with it. After rebooting, log in and double-click the <indexterm id="ch03-idx-948087-0"><primary>Network Neighborhood icon</primary></indexterm>Network Neighborhood icon on the desktop. You should see your Samba server listed as a member of the workgroup, as shown in <link linkend="ch03-88553">Figure 3.14</link>.</para>
358 <figure label="3.14" id="ch03-88553">
359 <title>Windows Network Neighborhood</title>
361 <graphic width="502" depth="139" fileref="figs/sam.0314.gif"></graphic>
364 <para>Double-clicking the server name will show the resources that the server is offering to the network, as shown in <link linkend="ch03-17463">Figure 3.15</link> (in this case a printer and the <emphasis>test</emphasis> directory).</para>
367 <figure label="3.15" id="ch03-17463">
368 <title>Shares on Server</title>
370 <graphic width="502" depth="152" fileref="figs/sam.0315.gif"></graphic>
374 <para>If you are presented with a dialog requesting the password for a user <literal>IPC$</literal>, then Samba did not accept the password that was sent from the client. In this case, the username and the password that were created on the client side <emphasis>must</emphasis> match the username/password combination on the Samba server. If you are using Windows 98 or Windows NT Service Pack 3 or above, this is probably because the client is sending encrypted passwords instead of plaintext passwords. You can remedy this situation by performing two steps on the Samba server. First, add the following entry to the <literal>[global]</literal> section of your Samba configuration file: <literal>encrypt password=yes</literal>. Second, find the <filename>smbpasswd</filename> program on the samba server (it is located in <filename>/usr/local/samba/bin</filename> by default) and use it to add an entry to Samba's encrypted password database. For example, to add user <literal>steve</literal> to Samba's encrypted password database, type <replaceable>smbpasswd -a steve</replaceable>. The first time you enter this password, the program will output an error message indicating that the password database does not exist; it will then create the database, which is typically stored in <filename>/usr/local/samba/private/smbpasswd</filename>.</para>
378 <para>If you don't see the server listed, start Windows Explorer (not Internet Explorer!) and select <indexterm id="ch03-idx-948088-0"><primary>Map Network Drive option</primary></indexterm>Map Network Drive from the Tools menu. This will give you a dialog box into which you can type the name of your server and the share <literal>test </literal>in the <indexterm id="ch03-idx-948089-0"><primary>Windows UNC format</primary></indexterm>Windows UNC format: <filename>\\</filename><replaceable>server</replaceable><filename>\test</filename>, like we did in the first chapter. This should attempt to contact the Samba server and its temporary share. If things still aren't right, go to <link linkend="SAMBA-CH-9">Chapter 9</link>, for troubleshooting assistance.<indexterm id="ch03-idx-947933-0" class="endofrange" startref="ch03-idx-947927-0"/>
379 <indexterm id="ch03-idx-947933-1" class="endofrange" startref="ch03-idx-947927-1"/></para>
391 <sect1 role="" label="3.2" id="ch03-23093">
392 <title>Setting Up Windows NT 4.0 Computers</title>
396 <indexterm id="ch03-idx-947940-0" class="startofrange"><primary>Windows clients</primary><secondary>configuring</secondary><tertiary>Windows NT 4.0 computers</tertiary></indexterm>
397 <indexterm id="ch03-idx-947940-1" class="startofrange"><primary>configuring Windows clients</primary><secondary>Windows NT 4.0 computers</secondary></indexterm>Configuring Windows NT is a little different than configuring Windows 95/98. In order to use Samba with Windows NT, you will need both the Workstation service and the TCP/IP protocol. Both come standard with NT, but we'll work through installing and configuring them because they may not be configured correctly.</para>
400 <para>There are six basic steps:</para>
404 <listitem><para>Assign the machine a name.</para></listitem>
405 <listitem><para>Install the Workstation service.</para></listitem>
406 <listitem><para>Install the TCP/IP protocol.</para></listitem>
407 <listitem><para>Set the machine's name and IP address.</para></listitem>
408 <listitem><para>Configure the DNS and WINS name services.</para></listitem>
409 <listitem><para>Bind the protocol and service together.</para></listitem>
412 <sect2 role="" label="3.2.1" id="ch03-SECT-2.1">
413 <title>Basic Configuration</title>
417 <indexterm id="ch03-idx-948108-0" class="startofrange"><primary>configuring Windows clients</primary><secondary>Windows NT 4.0 computers</secondary><tertiary>basic configuration</tertiary></indexterm>This section presents an outline of the steps to follow for getting Windows NT to cooperate with Samba. If you need more details on Windows NT network administration, refer to Craig Hunt and Robert Bruce Thompsom's <citetitle>Windows NT TCP/IP Network Administration </citetitle>(O'Reilly), an excellent guide. You should perform these steps as the "Administrator" user.</para>
420 <sect3 role="" label="3.2.1.1" id="ch03-SECT-2.1.1">
421 <title>Name the machine</title>
425 <indexterm id="ch03-idx-948120-0"><primary>naming</primary><secondary>NT computers</secondary></indexterm>
426 <indexterm id="ch03-idx-948120-1"><primary>Windows NT</primary><secondary>naming, caution with</secondary></indexterm>The first thing you need to do is to give the machine a <indexterm id="ch03-idx-948122-0"><primary>NetBIOS name</primary><secondary>setting</secondary><tertiary>Windows NT</tertiary></indexterm>NetBIOS name. From the Control Panel, double click on the <indexterm id="ch03-idx-948123-0"><primary>Network icon</primary><secondary>Windows NT</secondary></indexterm>Network icon. This will take you to the <indexterm id="ch03-idx-948124-0"><primary>Network dialog box (Windows NT)</primary></indexterm>Network dialog box for the machine. The first tab in this dialog box should be the Identification tab, as illustrated in <link linkend="ch03-82592">Figure 3.16</link>.</para>
429 <figure label="3.16" id="ch03-82592">
430 <title>Network panel Identification tab</title>
432 <graphic width="502" depth="260" fileref="figs/sam.0316.gif"></graphic>
435 <para>Here, you need to identify your machine with a name (we use the name Artish here) and change the default workgroup to the one you specified in the <emphasis>smb.conf</emphasis>
436 <indexterm id="ch03-idx-948125-0"><primary>smb.conf (Samba configuration) file</primary></indexterm> file of your Samba server. In this case, the workgroup name is SIMPLE. However, you cannot edit either name here (as you could in Windows 95/98), but instead must use the Change button below the two text fields. Pressing this button raises an <indexterm id="ch03-idx-948126-0"><primary>Identification Changes dialog box (Windows NT)</primary></indexterm>Identification Changes dialog box, where you can reset the workgroup and the machine name, as shown in <link linkend="ch03-67735">Figure 3.17</link>.</para>
439 <figure label="3.17" id="ch03-67735">
440 <title>Changing the identification</title>
442 <graphic width="502" depth="360" fileref="figs/sam.0317.gif"></graphic>
446 <indexterm id="ch03-idx-948129-0"><primary>naming</primary><secondary>NT computers</secondary><tertiary>caution with</tertiary></indexterm>A word of warning: you will have to set the machine name again later while configuring TCP/IP, so be sure that the two names match. The name you set here is the NetBIOS name. You're allowed to make it different from the TCP/IP hostname, but doing so is usually not a good thing. Don't worry that Windows NT forces the computer name and the workgroup to be all capital letters; it's smart enough to figure out what you mean when it connects to the network.</para>
451 <sect3 role="" label="3.2.1.2" id="ch03-SECT-2.1.2">
452 <title>Installing the TCP/IP protocol</title>
456 <indexterm id="ch03-idx-948143-0"><primary>TCP/IP networking protocol</primary><secondary>installing</secondary></indexterm>
457 <indexterm id="ch03-idx-948143-1"><primary>installing TCP/IP protocol</primary></indexterm>Next, select the <indexterm id="ch03-idx-948150-0"><primary>Protocols tab</primary></indexterm>Protocols tab in the Network dialog box, and look to see if you have the TCP/IP protocol installed, as shown in <link linkend="ch03-66055">Figure 3.18</link>.</para>
460 <figure label="3.18" id="ch03-66055">
461 <title>The Protocols tab</title>
463 <graphic width="502" depth="257" fileref="figs/sam.0318.gif"></graphic>
466 <para>If the protocol is not installed, you need to add it. Press the Add button, which will display the <indexterm id="ch03-idx-948148-0"><primary>Select Network Protocol dialog box</primary></indexterm>Select Network Protocol dialog box shown in <link linkend="ch03-22321">Figure 3.19</link>. Unlike Windows 95/98, you should immediately see the TCP/IP protocol as one of the last protocols listed.</para>
469 <figure label="3.19" id="ch03-22321">
470 <title>Select Network Protocol dialog box</title>
472 <graphic width="502" depth="285" fileref="figs/sam.0319.gif"></graphic>
475 <para>Select TCP/IP<emphasis></emphasis> as the protocol and confirm it. If possible, install only the TCP/IP protocol. You usually do not want <indexterm id="ch03-idx-948149-0"><primary>NetBEUI (NetBIOS Extended User Interface)</primary><secondary>Windows NT computers and</secondary></indexterm>NetBEUI installed because this causes the machine to look for services under two different protocols, only one of which is likely in use.<footnote label="2" id="ch03-pgfId-943371">
478 <para>A common occurrence: after looking at the unused protocol for a while, the machine will time out and try the good one. This fruitless searching gives you terrible performance and mysterious delays.</para>
486 <sect3 role="" label="3.2.1.3" id="ch03-SECT-2.1.3">
487 <title>Installing the Workstation service</title>
491 <indexterm id="ch03-idx-948151-0"><primary>Workstation service, installing</primary></indexterm>
492 <indexterm id="ch03-idx-948151-1"><primary>installing Workstation service</primary></indexterm>
493 <indexterm id="ch03-idx-948151-2"><primary>services</primary><secondary>Workstation</secondary></indexterm>After installing TCP/IP, press the <indexterm id="ch03-idx-948152-0"><primary>Services tab</primary></indexterm>Services tab in the Network panel and check that you have a Workstation service, as shown at the end of the list in <link linkend="ch03-97222">Figure 3.20</link>.</para>
496 <figure label="3.20" id="ch03-97222">
497 <title>Network Services panel dialog box</title>
499 <graphic width="502" depth="289" fileref="figs/sam.0320.gif"></graphic>
502 <para>This service is actually the <indexterm id="ch03-idx-948153-0"><primary>Microsoft Networking Client</primary></indexterm>Microsoft Networking Client, which allows the machine to access SMB services. The Workstation service is mandatory. The service is installed by default on both <indexterm id="ch03-idx-948154-0"><primary>Windows NT Workstation 4.0</primary></indexterm>
503 <indexterm id="ch03-idx-948155-0"><primary>Windows NT Server 4.0</primary></indexterm>Windows NT Workstation 4.0 and <indexterm id="ch03-idx-948159-0"><primary>TCP/IP networking protocol</primary><secondary>installing</secondary></indexterm>
504 <indexterm id="ch03-idx-948159-1"><primary>installing TCP/IP protocol</primary></indexterm>Server 4.0. If it's not there, you can install it much like TCP/IP. In this case you need to press the Add button and then select Workstation Service, as shown in <link linkend="ch03-40000">Figure 3.21</link>.</para>
507 <figure label="3.21" id="ch03-40000">
508 <indexterm id="ch03-idx-948115-0" class="endofrange" startref="ch03-idx-948108-0"/><title>Select Network Service dialog box </title>
510 <graphic width="502" depth="285" fileref="figs/sam.0321.gif"></graphic>
519 <sect2 role="" label="3.2.2" id="ch03-85837">
520 <title>Configuring TCP/IP</title>
524 <indexterm id="ch03-idx-948163-0" class="startofrange"><primary>TCP/IP networking protocol</primary><secondary>configuring</secondary></indexterm>
525 <indexterm id="ch03-idx-948163-1" class="startofrange"><primary>configuring TCP/IP networking protocol</primary></indexterm>After you've installed the Workstation service, return to the <indexterm id="ch03-idx-948172-0"><primary>Protocols tab</primary></indexterm>Protocols tab and select the TCP/IP Protocol entry in the window. Then click the Properties button below the window. The Microsoft TCP/IP Protocol panel will be displayed. There are five tabs on the Windows NT panel, and (like Windows 95/98) you will need to work on three of them:</para>
529 <listitem><para>IP address</para></listitem>
530 <listitem><para>DNS</para></listitem>
531 <listitem><para>WINS address</para></listitem>
534 <sect3 role="" label="3.2.2.1" id="ch03-SECT-2.2.1">
535 <title>IP Address tab</title>
539 <indexterm id="ch03-idx-948191-0"><primary>IP Address tab</primary><secondary>Windows NT</secondary></indexterm>The IP Address tab is shown in <link linkend="ch03-97098">Figure 3.22</link>.</para>
542 <figure label="3.22" id="ch03-97098">
543 <title>Microsoft TCP/IP Properties for Windows NT</title>
545 <graphic width="502" depth="380" fileref="figs/sam.0322.gif"></graphic>
549 <indexterm id="ch03-idx-948212-0"><primary>Windows NT</primary><secondary>IP address, setting</secondary></indexterm>
550 <indexterm id="ch03-idx-948212-1"><primary>IP address</primary><secondary>setting for Windows NT computers</secondary></indexterm>Select the "Specify an IP address" radio button and enter the computer's address and <indexterm id="ch03-idx-948231-0"><primary>subnets</primary><secondary>mask</secondary></indexterm>
551 <indexterm id="ch03-idx-948231-1"><primary>masks</primary><secondary>subnet</secondary></indexterm>subnet mask in the space provided for the proper adapter (Ethernet card). You or your network manager should have selected an address for the client on the same subnet (LAN) as the Samba server. For example, if the server's address is 192.168.236.86 and its network mask 255.255.255.0, you might use the address 192.168.236.10, if it is available, for the NT workstation, along with the same <indexterm id="ch03-idx-948235-0"><primary>netmasks</primary></indexterm>netmask. If you use <indexterm id="ch03-idx-948242-0"><primary>DHCP (Dynamic Host Configuration Protocol)</primary></indexterm>DHCP on your network, select the "Obtain an IP Address from a DHCP server" button.</para>
555 <para>If you don't have an IP address to use, and you are on a network by yourself, steal ours, as the 192.168.<emphasis>x.x</emphasis> subnet is specifically reserved by the Internic for LANs. If you're not by yourself, see your system administrator for some available addresses on your network.</para>
559 <para>The<indexterm id="ch03-idx-948244-0"><primary>gateway field</primary></indexterm> gateway field refers to a machine typically known as a <emphasis>router</emphasis>
560 <indexterm id="ch03-idx-948243-0"><primary>routers, TCP/IP configuring and</primary></indexterm>. If you have routers connecting multiple networks, you should put in the IP address of the one on your subnet.</para>
565 <sect3 role="" label="3.2.2.2" id="ch03-SECT-2.2.2">
566 <title>DNS tab</title>
570 <indexterm id="ch03-idx-948199-0"><primary>DNS (Domain Name System)</primary><secondary>tab</secondary></indexterm>Next we go to the tab for DNS, as shown in <link linkend="ch03-61878">Figure 3.23</link>. This brings up the DNS panel.</para>
573 <figure label="3.23" id="ch03-61878">
574 <title>The DNS panel</title>
576 <graphic width="502" depth="407" fileref="figs/sam.0323.gif"></graphic>
579 <para>The <indexterm id="ch03-idx-948248-0"><primary>DNS (Domain Name System)</primary><secondary>configuring</secondary></indexterm>
580 <indexterm id="ch03-idx-948248-1"><primary>configuring DNS (Windows NT)</primary></indexterm>Domain Name System (DNS) is responsible for translating human-readable computer names such as <emphasis>atrish.example.com</emphasis> into IP addresses such as 192.168.236.10. There are two ways to accomplish this on a NT machine. First, you can specify a DNS server to do the translation for you, or you can keep a local list of name/address pairs for your workstation to refer to.</para>
583 <para>For a LAN that's not on the Internet, the list of possible hosts is typically small and well known, and may be kept in a file locally. Networks that are connected to the Internet typically use DNS service since it isn't possible to guess ahead of time what addresses you might be accessing out on the net. If you are in doubt as to whether a DNS server is being used, or what its address might be, look at the file <emphasis>/etc/resolv.conf</emphasis> on your Samba server: any machine using DNS will have this file. It looks like the following:</para>
586 <programlisting>#resolv.conf
589 nameserver 192.168.236.20</programlisting>
592 <para>In this example, the first nameserver in the list is 127.0.0.1, which indicates that the Samba server is also a DNS server for this LAN.<footnote label="3" id="ch03-pgfId-946587">
595 <para>The address 127.0.0.1 is known as the <emphasis>localhost</emphasis>
596 <indexterm id="ch03-idx-948263-0"><primary>localhost</primary><secondary>address</secondary></indexterm> address, and always refers to itself. For example, if you type <literal>ping 127.0.0.1</literal> on a Unix server, you should always get a response, as you're pinging the host itself.</para>
599 </footnote> In that case, you would use its network IP address (not 127.0.0.1, its localhost address) when filling in the DNS Configuration dialog box. Otherwise, use the other addresses you find in the lines beginning with <literal>nameserver</literal>. Try to select ones on your own network. Any name servers listed in <emphasis>/etc/resolv.conf</emphasis> should work, but you'll get better performance by using a server nearby.</para>
602 <para>Finally, enter the machine name once more, making sure that it's the same one listed in the Identification tab of the Network dialog box (before the NetBIOS name). Also, enter the DNS domain on which this machine resides. For example, if your workstation has a domain name such as <emphasis>example.com</emphasis>, enter it here. You can safely ignore the other options.</para>
607 <sect3 role="" label="3.2.2.3" id="ch03-SECT-2.2.3">
608 <title>WINS Address tab</title>
612 <indexterm id="ch03-idx-948207-0"><primary>WINS Address tab (Windows NT panel)</primary></indexterm>
613 <indexterm id="ch03-idx-948207-1"><primary>WINS (Windows Internet Name Service)</primary><secondary>address, configuring</secondary></indexterm>
614 <indexterm id="ch03-idx-948207-2"><primary>configuring WINS address</primary></indexterm>If you are not using a DNS server, you still need a way of translating NetBIOS names to addresses and back again. We recommend that you configure both DNS and WINS; <indexterm id="ch03-idx-948268-0"><primary>Windows NT</primary><secondary>WINS address and</secondary></indexterm>NT has a preference for WINS and WINS can use DNS as a fallback if it cannot resolve any machine address. The WINS Address tab is shown in <link linkend="ch03-20855">Figure 3.24</link>.</para>
617 <figure label="3.24" id="ch03-20855">
618 <title>The WINS Address tab</title>
620 <graphic width="502" depth="342" fileref="figs/sam.0324.gif"></graphic>
623 <para>If you have a WINS server, enter its address in the space marked Primary WINS Server. If your Samba server is providing WINS service (in other words, you have the line <literal>wins</literal> <literal>service</literal> <literal>=</literal> <literal>yes</literal> in the <emphasis>smb.conf</emphasis> file of your Samba server), provide the Samba server's IP address here. Otherwise, provide the address of another WINS server on your network.</para>
626 <para>You probably noticed that there is a field here for the adaptor; this field must specify the <indexterm id="ch03-idx-948269-0"><primary>Ethernet adaptor cards</primary></indexterm>Ethernet adaptor that you're running TCP/IP on so that WINS will provide name service on the correct network. If you have both a LAN and a dialup adaptor, make sure you have the LAN's adaptor here.</para>
629 <para>Finally, select the "Enable DNS for Windows Resolution" checkbox, so WINS will try <indexterm id="ch03-idx-948270-0"><primary>DNS (Domain Name System)</primary><secondary sortas="fallback for WINS address">as fallback for WINS address</secondary></indexterm>DNS as a fallback if it can't find a name. You can safely ignore the other options.</para>
634 <sect3 role="" label="3.2.2.4" id="ch03-SECT-2.2.4">
635 <title>Hosts files</title>
639 <indexterm id="ch03-idx-948271-0"><primary>hosts</primary><secondary>files (Windows NT computers)</secondary></indexterm>If you don't have either DNS or WINS, and you don't wish to use broadcast name resolution, you'll need to provide a table of IP addresses and hosts names, in standard Unix <filename>/etc/hosts</filename> format. We recommend against this because maintenance of this file on any dynamic network is troublesome, but we will explain it just the same. The Windows host file should appear in the <emphasis>\WINDOWS\HOSTS</emphasis>
640 <indexterm id="ch03-idx-948273-0"><primary sortas="WINDOWS\HOSTS directory">\WINDOWS\HOSTS directory</primary></indexterm> directory of whatever local drive Windows is installed on. A sample follows:</para>
643 <programlisting>127.0.0.1 localhost
644 192.168.236.1 escrime escrime.example.com
645 192.168.236.2 riposte riposte.example.com
646 192.168.236.3 wizzin wizzin.example.com
647 192.168.236.4 touche touche.example.com
648 192.168.236.5 gurgi gurgi.example.com
649 192.168.236.6 jessiac jessiac.example.com
650 192.168.236.7 skyline skyline.example.com</programlisting>
653 <para>If you wish, you can copy the contents directly from the Samba server's<filename> /etc/hosts</filename>. The format is identical. This file will then serve the same purpose as the hosts file on the Unix server. Again, <emphasis>hosts</emphasis> files on Windows should only be used as a last resort.</para>
658 <sect3 role="" label="3.2.2.5" id="ch03-SECT-2.2.5">
659 <title>Bindings</title>
662 <para>The term <firstterm>bindings</firstterm>
663 <indexterm id="ch03-idx-948274-0"><primary>bindings</primary></indexterm>
664 <indexterm id="ch03-idx-948274-1"><primary>service bindings</primary></indexterm> is a way of saying "connected together at configuration time." It means that the TCP/IP protocol will channel through the Ethernet card (instead of, say, a dialup connection), and is actually connected properly. If you return to the Network dialog box and set the Show field to "all services" and click on all the + buttons in the tree, you should see a display similar to <link linkend="ch03-83060">Figure 3.25</link>.</para>
667 <figure label="3.25" id="ch03-83060">
668 <title>Service bindings</title>
670 <graphic width="502" depth="332" fileref="figs/sam.0325.gif"></graphic>
673 <para>This means that the Workstation, Server, and NetBIOS interface services are connected to the WINS client. This is the correct binding for Microsoft TCP/IP.<indexterm id="ch03-idx-948166-0" class="endofrange" startref="ch03-idx-948163-0"/>
674 <indexterm id="ch03-idx-948166-1" class="endofrange" startref="ch03-idx-948163-1"/></para>
682 <sect2 role="" label="3.2.3" id="ch03-SECT-2.3">
683 <title>Connecting to the Samba Server</title>
687 <indexterm id="ch03-idx-948286-0"><primary>Samba server</primary><secondary>connecting to</secondary></indexterm>You can safely leave the default values for the remainder of the tabs in the Network dialog box. Click on the OK button to complete the configuration. Once the proper files are loaded (if any), you will need to reboot in order for your changes to take effect.</para>
690 <para>Now for the big moment. Your Samba server is running and you have set up your NT client to communicate with it. After the machine reboots, login and double-click the <indexterm id="ch03-idx-948283-0"><primary>Network Neighborhood icon</primary><secondary>viewing Samba server</secondary></indexterm>
691 <indexterm id="ch03-idx-948283-1"><primary>Samba server</primary><secondary>viewing via Network Neighborhood icon</secondary></indexterm>Network Neighborhood icon on the desktop, and you should see your Samba server listed as a member of the workgroup, as shown in <link linkend="ch03-50785">Figure 3.26</link>.</para>
694 <figure label="3.26" id="ch03-50785">
695 <title>Windows NT Network Neighborhood</title>
697 <graphic width="502" depth="163" fileref="figs/sam.0326.gif"></graphic>
701 <indexterm id="ch03-idx-949153-0"><primary>Samba server</primary><secondary>resources offered</secondary></indexterm>Double-clicking the server name will show the resources that the server is offering to the network, as shown in <link linkend="ch03-89532">Figure 3.27</link>. In this case, the test and the default printer are offered to the Window NT workstation. For more information, see the warning under <link linkend="ch03-13238">Section 3.1.4</link> earlier in this chapter.</para>
704 <figure label="3.27" id="ch03-89532">
705 <title>Server's shares</title>
707 <graphic width="502" depth="152" fileref="figs/sam.0327.gif"></graphic>
711 <para>If you are presented with a dialog requesting the password for a user <literal>IPC$</literal>, then Samba did not accept the password that was sent from the client. In this case, the username and the password that were created on the client side <emphasis>must</emphasis> match the username/password combination on the Samba server. If you are using Windows 98 or Windows NT Service Pack 3 or above, this is probably because the client is sending encrypted passwords instead of plaintext passwords. You can remedy this situation by performing two steps on the Samba server. First, add the following entry to the <literal>[global]</literal> section of your Samba configuration file: <literal>encrypt password=yes</literal>. Second, find the <filename>smbpasswd</filename> program on the samba server (it is located in <filename>/usr/local/samba/bin</filename> by default) and use it to add an entry to Samba's encrypted password database. For example, to add user <literal>steve</literal> to Samba's encrypted password database, type <replaceable>smbpasswd -a steve</replaceable>. The first time you enter this password, the program will output an error message indicating that the password database does not exist; it will then create the database, which is typically stored in <filename>/usr/local/samba/private/smbpasswd</filename>.</para>
715 <para>If you don't see the server listed, don't panic. Start the Windows NT Explorer (not Internet Explorer!) and select Map Network Drive from the Tools menu. A dialog box appears that allows you to type the name of your server and its share directory in Windows format. For example, you would enter <filename>\\</filename><replaceable>server</replaceable><filename>\temp</filename> if your server happened to be named "server." If things still aren't right, go directly to <link linkend="ch09-29538">Section 9.2</link> in <link linkend="SAMBA-CH-9">Chapter 9</link>, to see if you can troubleshoot what is wrong with the network.</para>
718 <para>If it works, congratulations! Try writing to the server and sending data to the network printer. You will be pleasantly surprised how seamlessly everything works! Now that you've finished setting up the Samba server and its clients, we can starting talking about how Samba works and how to configure it to your liking. <indexterm id="ch03-idx-947946-0" class="endofrange" startref="ch03-idx-947940-0"/>
719 <indexterm id="ch03-idx-947946-1" class="endofrange" startref="ch03-idx-947940-1"/></para>
731 <sect1 role="" label="3.3" id="ch03-64069">
732 <title>An Introduction to SMB/CIFS</title>
736 <indexterm id="ch03-idx-948288-0" class="startofrange"><primary>SMB (Server Message Block)</primary></indexterm>We'll wrap up this chapter with a short tutorial on SMB/CIFS. SMB/CIFS is the protocol that Windows 95/98 and NT machines use to communicate with the Samba server and each other. At a high level, the SMB protocol suite is relatively simple. It includes commands for all of the file and print operations that you might do on a local disk or printer, such as:</para>
740 <listitem><para> Opening and closing a file</para></listitem>
741 <listitem><para> Creating and deleting files and directories</para></listitem>
742 <listitem><para> Reading and writing a file</para></listitem>
743 <listitem><para> Searching for files</para></listitem>
744 <listitem><para> Queueing and dequeueing files to a print spool</para></listitem>
747 <para>Each of these operations can be encoded into an SMB message and transmitted to and from a server. The original name SMB comes from their data format: these are versions of the standard DOS system-call data structures, or <firstterm>Server Message Blocks</firstterm>, redesigned for transmitting to another machine across a network.</para>
750 <sect2 role="" label="3.3.1" id="ch03-SECT-3.1">
751 <title>SMB Format</title>
755 <indexterm id="ch03-idx-948317-0"><primary>SMB (Server Message Block)</primary><secondary>format of</secondary></indexterm>Richard <indexterm id="ch03-idx-948318-0"><primary>Sharpe, Richard</primary></indexterm>Sharpe of the Samba team defines SMB as a "request-response" protocol.<footnote label="4" id="ch03-pgfId-942928">
758 <para>See <systemitem role="url">http://anu.samba.org/cifs/docs/what-is-smb.html</systemitem> for Richard's excellent summary of SMB.</para>
761 </footnote> In effect, this means that a client sends an SMB request to a server, and the server sends an <indexterm id="ch03-idx-948320-0"><primary>SMB (Server Message Block)</primary><secondary>resources for further information</secondary></indexterm>
762 <indexterm id="ch03-idx-948320-1"><primary>URLs (uniform resource locators)</primary><secondary>SMB (Server Message Block)</secondary></indexterm>SMB response back to the client. Rarely does a server send a message that is not in response to a client.</para>
765 <para>An SMB message is not as complex as you might think. Let's take a closer look at the internal structure of such a message. It can be broken down into two parts: the <firstterm>header</firstterm>
766 <indexterm id="ch03-idx-948321-0"><primary>header, SMB</primary></indexterm>, which is a fixed size, and the <firstterm>command string</firstterm>, whose size can vary dramatically based on the contents of the message.</para>
769 <sect3 role="" label="3.3.1.1" id="ch03-SECT-3.1.1">
770 <title>SMB header format</title>
773 <para><link linkend="ch03-31015">Table 3.1</link> shows the format of an SMB header. SMB commands are not required to use all the fields in the SMB header. For example, when a client first attempts to connect to a server, it does not yet have a <indexterm id="ch03-idx-948332-0"><primary>tree identifier (TID)</primary></indexterm>
774 <indexterm id="ch03-idx-948332-1"><primary>TID (tree identifier)</primary></indexterm>tree identifier (TID) value—one is assigned after it successfully connects—so a <indexterm id="ch03-idx-948333-0"><primary>null TID</primary></indexterm>null TID (0xFFFF) is placed in its header field. Other fields may be padded with zeros when not used.</para>
777 <para>The fields of the SMB header are listed in <link linkend="ch03-31015">Table 3.1</link>.</para>
780 <table label="3.1" id="ch03-31015">
781 <title>SMB Header Fields </title>
784 <colspec colnum="1" colname="col1"/>
785 <colspec colnum="2" colname="col2"/>
786 <colspec colnum="3" colname="col3"/>
790 <entry colname="col1"><para>Field</para></entry>
792 <entry colname="col2"><para>Size (bytes)</para></entry>
794 <entry colname="col3"><para>Description</para></entry>
803 <entry colname="col1"><para><literal>0xFF 'SMB'</literal></para></entry>
805 <entry colname="col2"><para><literal>1</literal></para></entry>
807 <entry colname="col3"><para>
808 <indexterm id="ch03-idx-948337-0"><primary>SMB (Server Message Block)</primary><secondary>header</secondary></indexterm>Protocol identifier</para></entry>
814 <entry colname="col1"><para><literal>COM</literal></para></entry>
816 <entry colname="col2"><para><literal>1</literal></para></entry>
818 <entry colname="col3"><para>Command code, from 0x00 to 0xFF</para></entry>
824 <entry colname="col1"><para><literal>RCLS</literal></para></entry>
826 <entry colname="col2"><para><literal>1</literal></para></entry>
828 <entry colname="col3"><para>Error class</para></entry>
834 <entry colname="col1"><para><literal>REH</literal></para></entry>
836 <entry colname="col2"><para><literal>1</literal></para></entry>
838 <entry colname="col3"><para>Reserved</para></entry>
844 <entry colname="col1"><para><literal>ERR</literal></para></entry>
846 <entry colname="col2"><para><literal>2</literal></para></entry>
848 <entry colname="col3"><para>Error code</para></entry>
854 <entry colname="col1"><para><literal>REB</literal></para></entry>
856 <entry colname="col2"><para><literal>1</literal></para></entry>
858 <entry colname="col3"><para>Reserved</para></entry>
864 <entry colname="col1"><para><literal>RES</literal></para></entry>
866 <entry colname="col2"><para><literal>14</literal></para></entry>
868 <entry colname="col3"><para>Reserved</para></entry>
874 <entry colname="col1"><para><literal>TID</literal></para></entry>
876 <entry colname="col2"><para><literal>2</literal></para></entry>
878 <entry colname="col3"><para>Tree identifier; a unique ID for a resource in use by client</para></entry>
884 <entry colname="col1"><para><literal>PID</literal></para></entry>
886 <entry colname="col2"><para><literal>2</literal></para></entry>
888 <entry colname="col3"><para>Caller process ID</para></entry>
894 <entry colname="col1"><para><literal>UID</literal></para></entry>
896 <entry colname="col2"><para><literal>2</literal></para></entry>
898 <entry colname="col3"><para>User identifier</para></entry>
904 <entry colname="col1"><para><literal>MID</literal></para></entry>
906 <entry colname="col2"><para><literal>2</literal></para></entry>
908 <entry colname="col3"><para>Multiplex identifier; used to route requests inside a process</para></entry>
919 <sect3 role="" label="3.3.1.2" id="ch03-SECT-3.1.2">
920 <title>SMB command format</title>
923 <para><firstterm></firstterm>
924 <indexterm id="ch03-idx-948328-0"><primary>command string, SMB</primary></indexterm>Immediately after the header is a variable number of bytes that constitute an SMB command or reply. Each command, such as Open File (COM field identifier: <literal>SMBopen</literal>) or Get Print Queue (<literal>SMBsplretq </literal>), has its own set of parameters and data. Like the SMB header fields, not all of the command fields need to be filled, depending on the specific command. For example, the Get Server Attributes (<literal>SMBdskattr</literal>) command sets the WCT and BCC fields to zero. The fields of the command segment are shown in <link linkend="ch03-38178">Table 3.2</link>.</para>
927 <table label="3.2" id="ch03-38178">
928 <title>SMB Command Contents </title>
931 <colspec colnum="1" colname="col1"/>
932 <colspec colnum="2" colname="col2"/>
933 <colspec colnum="3" colname="col3"/>
937 <entry colname="col1"><para>Field</para></entry>
939 <entry colname="col2"><para>Size in Bytes</para></entry>
941 <entry colname="col3"><para>Description</para></entry>
950 <entry colname="col1"><para><literal>WCT</literal></para></entry>
952 <entry colname="col2"><para><literal>1</literal></para></entry>
954 <entry colname="col3"><para><firstterm></firstterm>
955 <indexterm id="ch03-idx-948340-0"><primary>SMB (Server Message Block)</primary><secondary>command string</secondary></indexterm>Word count</para></entry>
961 <entry colname="col1"><para><literal>VWV</literal></para></entry>
963 <entry colname="col2"><para>Variable</para></entry>
965 <entry colname="col3"><para>Parameter words (size given by WCT)</para></entry>
971 <entry colname="col1"><para><literal>BCC</literal></para></entry>
973 <entry colname="col2"><para><literal>2</literal></para></entry>
975 <entry colname="col3"><para>Parameter byte count</para></entry>
981 <entry colname="col1"><para><literal>DATA</literal></para></entry>
983 <entry colname="col2"><para>Variable</para></entry>
985 <entry colname="col3"><para>Data (size given by BCC)</para></entry>
994 <para>Don't worry if you don't understand each of these fields; they are not necessary for using Samba at an administrator level. However, they do come in handy when debugging system messages. We will show you some of the more common SMB messages that clients and servers send using a modified version of <filename>tcpdump</filename> later in this section. (If you would like an SMB sniffer with a graphical interface, try "ethereal," which uses the GTK libraries; see the Samba homepage for more information on this tool.)</para>
997 <tip id="ch03-resources-for-further-information" role="ora">
998 <para>If you would like more information on each of the commands for the SMB protocol, see the SMB/CIFS documentation at <systemitem role="ftpurl">ftp://ftp.microsoft.com/developr/drg/CIFS/</systemitem>.</para>
1005 <sect3 role="" label="3.3.1.3" id="ch03-SECT-3.1.3">
1006 <title>SMB variations</title>
1009 <para>The SMB protocol has been extended with new commands several times since its inception. Each new version is backwards compatible with the previous versions. This makes it quite possible for a LAN to have various clients and servers running different versions of the SMB protocol at once.</para>
1012 <para><link linkend="ch03-67366">Table 3.3</link> outlines the major versions of the SMB protocol. Within each "dialect" of SMB are many sub-versions that include commands supporting particular releases of major operating systems. The ID string is used by clients and servers to determine what level of the protocol they will speak to each other.</para>
1015 <table label="3.3" id="ch03-67366">
1016 <title>SMB Protocol Dialects </title>
1019 <colspec colnum="1" colname="col1"/>
1020 <colspec colnum="2" colname="col2"/>
1021 <colspec colnum="3" colname="col3"/>
1025 <entry colname="col1"><para>Protocol Name</para></entry>
1027 <entry colname="col2"><para>ID String</para></entry>
1029 <entry colname="col3"><para>Used By</para></entry>
1038 <entry colname="col1"><para>Core</para></entry>
1040 <entry colname="col2"><para><literal>PC NETWORK PROGRAM 1.0</literal></para></entry>
1042 <entry colname="col3"></entry>
1048 <entry colname="col1"><para>Core Plus</para></entry>
1050 <entry colname="col2"><para><literal>MICROSOFT NETWORKS 1.03 </literal></para></entry>
1052 <entry colname="col3"></entry>
1058 <entry colname="col1"><para>LAN Manager 1.0</para></entry>
1060 <entry colname="col2"><para><literal>LANMAN1.0</literal></para></entry>
1062 <entry colname="col3"></entry>
1068 <entry colname="col1"><para>LAN Manager 2.0</para></entry>
1070 <entry colname="col2"><para><literal>LM1.2X002</literal></para></entry>
1072 <entry colname="col3"></entry>
1078 <entry colname="col1"><para>LAN Manager 2.1</para></entry>
1080 <entry colname="col2"><para><literal>LANMAN2.1</literal></para></entry>
1082 <entry colname="col3"></entry>
1088 <entry colname="col1"><para>NT LAN Manager 1.0</para></entry>
1090 <entry colname="col2"><para><literal>NT LM 0.12</literal></para></entry>
1092 <entry colname="col3"><para>Windows NT 4.0</para></entry>
1098 <entry colname="col1"><para>Samba's NT LM 0.12</para></entry>
1100 <entry colname="col2"><para><literal>Samba</literal></para></entry>
1102 <entry colname="col3"><para>Samba</para></entry>
1108 <entry colname="col1"><para>Common Internet File System</para></entry>
1110 <entry colname="col2"><para><literal>CIFS 1.0</literal></para></entry>
1112 <entry colname="col3"><para>Windows 2000</para></entry>
1121 <para>Samba implements the <literal>NT</literal> <literal>LM</literal> <literal>0.12</literal> specification for NT LAN Manager 1.0. It is backwards compatible with all of the other SMB variants. The CIFS specification is, in reality, LAN Manager 0.12 with a few specific additions.</para>
1129 <sect2 role="" label="3.3.2" id="ch03-SECT-3.2">
1130 <title>SMB Clients and Servers</title>
1133 <para>As mentioned earlier, SMB is a client/server protocol. In the purest sense, this means that a client sends a request to a server, which acts on the request and returns a reply. However, the client/server roles can often be reversed, sometimes within the context of a single SMB session. For example, consider the two Windows 95/98 computers in <link linkend="ch03-69480">Figure 3.28</link>. The computer named WIZZIN shares a printer to the network, and the computer named ESCRIME shares a disk directory. WIZZIN is in the client role when accessing ESCRIME's network drive, and in the server role when printing a job for ESCRIME.</para>
1136 <figure label="3.28" id="ch03-69480">
1137 <title>Two computers that both have resources to share</title>
1139 <graphic width="502" depth="153" fileref="figs/sam.0328.gif"></graphic>
1142 <para>This brings out an important point in Samba terminology:</para>
1146 <listitem><para>A <firstterm>server</firstterm> is a machine with a resource to share.</para></listitem>
1147 <listitem><para>A <firstterm>client</firstterm> is a machine that wishes to use that resource.</para></listitem>
1148 <listitem><para>A server can be a client (of another computer's resource) at any given time.</para></listitem>
1151 <para>Note that there are no implications as to the amount of resources that make up a server, or whether it has a large disk space or fast processor. A server could be an old 486 with a printer attached to it, or it could be an UltraSparc station with a 10 gigabyte disk service.</para>
1154 <para>Microsoft Windows products have both the SMB client and server built in to the operating system. <indexterm id="ch03-idx-948356-0"><primary>Windows NT</primary><secondary>client/server and</secondary></indexterm>Wndows NT 4.0 uses a newer SMB protocol than Windows for Workgroups, and it offers an enhanced form of network security which will be discussed in <link linkend="SAMBA-CH-6">Chapter 6</link>. In addition, there are a large number of commercial <indexterm id="ch03-idx-948361-0"><primary>SMB (Server Message Block)</primary><secondary>commercial products for</secondary></indexterm>SMB server products available from companies such as Sun, Compaq, SCO, Hewlett-Packard, Syntax, and IBM. Unfortunately, on the client side there are far fewer offerings, limited mainly to Digital Equipment's Pathworks product, and of course, Samba.</para>
1161 <sect2 role="" label="3.3.3" id="ch03-SECT-3.3">
1162 <title>A Simple SMB Connection</title>
1166 <indexterm id="ch03-idx-948363-0"><primary>SMB (Server Message Block)</primary><secondary>making a simple connection</secondary></indexterm>
1167 <indexterm id="ch03-idx-948363-1"><primary>connections</primary><secondary>SMB</secondary></indexterm>Before we close this chapter, let's take a look at a simple SMB connection. This is some pretty technical data—which isn't really necessary to administer Samba—so you can skip over it if you like. We present this information largely as a way to help you get familiar with how the SMB protocol negotiates connections with other computers on the network.</para>
1170 <para>There are four steps that the client and server must complete in order to establish a connection to a resource:</para>
1174 <listitem><para> Establish a virtual connection.</para></listitem>
1175 <listitem><para> Negotiate the protocol variant to speak.</para></listitem>
1176 <listitem><para> Set session parameters.</para></listitem>
1177 <listitem><para> Make a tree connection to a resource.</para></listitem>
1180 <para>We will examine each of these steps through the eyes of a useful tool that we mentioned earlier: the modified <filename>tcpdump</filename>
1181 <indexterm id="ch03-idx-948362-0"><primary>tcpdump utility</primary></indexterm>
1182 <indexterm id="ch03-idx-948362-1"><primary>downloads</primary><secondary>tcpdump utility</secondary></indexterm> that is available from the Samba web site.</para>
1186 <para>You can download this program at <filename>samba.org</filename> in the <filename>samba/ftp/tcpdump-smb</filename> directory; the latest version as of this writing is 3.4-5. Use this program as you would use the standard <filename>tcpdump</filename> application, but add the <literal>-s 1500</literal> switch to ensure that you get the whole packet and not just the first few bytes.</para>
1190 <sect3 role="" label="3.3.3.1" id="ch03-SECT-3.3.1">
1191 <title>Establishing a virtual connection</title>
1195 <indexterm id="ch03-idx-948365-0"><primary>connections</primary><secondary>virtual</secondary></indexterm>
1196 <indexterm id="ch03-idx-948365-1"><primary>virtual connection</primary></indexterm>When a user first makes a request to access a network disk or send a print job to a remote printer, NetBIOS takes care of making a connection at the <indexterm id="ch03-idx-948366-0"><primary>session layer, connection at</primary></indexterm>session layer. The result is a bidirectional virtual channel between the client and server. In reality, there are only two messages that the client and server need to establish this connection. This is shown in the following example session request and response, as captured by <filename>tcpdump</filename> :</para>
1199 <programlisting>>>> NBT Packet
1202 Destination=ESCRIME NameType=0x20 (Server)
1203 Source=WIZZIN NameType=0x00 (Workstation)
1205 >>> NBT Packet
1207 Flags=0x82000000</programlisting>
1215 <sect2 role="" label="3.3.4" id="ch03-SECT-3.4">
1216 <title>Negotiating the Protocol Variant</title>
1220 <indexterm id="ch03-idx-948367-0"><primary>protocols</primary><secondary>variant, negotiating</secondary></indexterm>At this point, there is an open channel between the client and server. Next, the client sends a message to the server to negotiate an SMB protocol. As mentioned earlier, the client sets its <indexterm id="ch03-idx-948373-0"><primary>tree identifier (TID)</primary></indexterm>
1221 <indexterm id="ch03-idx-948373-1"><primary>TID (tree identifier)</primary></indexterm>tree identifier (TID) field to zero, since it does not yet know what TID to use. A <emphasis>tree identifier</emphasis> is a number that represents a connection to a share on a server.</para>
1224 <para>The command in the message is <literal>SMBnegprot</literal>, a request to negotiate a protocol variant that will be used for the entire session. Note that the client sends to the server a list of all of the variants that it can speak, not vice versa.</para>
1227 <para>The server responds to the <literal>SMBnegprot</literal> request with an index into the list of variants that the client offered, starting with index 0, or with the value 0xFF if none of the protocol variants are acceptable. Continuing this example, the server responds with the value 5, which indicates that the <literal>NT</literal> <literal>LM</literal> <literal>0.12</literal> dialect will be used for the remainder of the session:</para>
1230 <programlisting>>>> NBT Packet
1235 SMB PACKET: SMBnegprot (REQUEST)
1246 Dialect=PC NETWORK PROGRAM 1.0
1247 Dialect=MICROSOFT NETWORKS 3.0
1248 Dialect=DOS LM1.2X002
1249 Dialect=DOS LANMAN2.1
1250 Dialect=Windows for Workgroups 3.1a
1253 >>> NBT Packet
1258 SMB PACKET: SMBnegprot (REPLY)
1269 [000] 05 00</programlisting>
1276 <sect2 role="" label="3.3.5" id="ch03-SECT-3.5">
1277 <title>Set Session and Login Parameters</title>
1281 <indexterm id="ch03-idx-948377-0"><primary>session parameters, setting</primary></indexterm>
1282 <indexterm id="ch03-idx-948377-1"><primary>login parameters, setting</primary></indexterm>The next step is to transmit session and login parameters for the session. This includes the account name and password (if there is one), the workgroup name, the maximum size of data that can be transferred, and the number of pending requests that may be in the queue at any one time.</para>
1285 <para>In the following example, the Session Setup command presented allows for an additional SMB command to be piggybacked onto it. The letter X at the end of the command name indicates this, and the hexadecimal code of the second command is given in the <literal>Com2</literal> field. In this case the command is <literal>0x75</literal>, which is the Tree Connect and X command. The <literal>SMBtconX</literal> message looks for the name of the resource in the <command>smb_buf</command> buffer. (This is the last field listed in the following request.) In this example, <command>smb_buf</command> contains the string <literal>\\ESCRIME\PUBLIC</literal>, which is the full pathname to a shared directory on node ESCRIME. Using the "and X" commands like this speeds up each transaction, since the server doesn't have to wait on the client to make a second request.</para>
1288 <para>Note that the <indexterm id="ch03-idx-948382-0"><primary>TID (tree identifier)</primary></indexterm>
1289 <indexterm id="ch03-idx-948382-1"><primary>tree identifier (TID)</primary></indexterm>TID is still zero. The server will provide a TID to the client once the session has been established and a connection has been made to the requested resource. In addition, note that the password is sent in the open. We can change this later using encrypted passwords:</para>
1292 <programlisting>>>> NBT Packet
1297 SMB PACKET: SMBsesssetupX (REQUEST)
1315 CaseInsensitivePasswordLength=1
1316 CaseSensitivePasswordLength=1
1319 Pass1&Pass2&Account&Domain&OS&LanMan=
1320 KRISTIN PARKSTR Windows 4.0 Windows 4.0
1322 Passwd&Path&Device=
1324 smb_buf[]=\\ESCRIME\PUBLIC</programlisting>
1331 <sect2 role="" label="3.3.6" id="ch03-SECT-3.6">
1332 <title>Making Connection to a Resource</title>
1336 <indexterm id="ch03-idx-948383-0"><primary>connections</primary><secondary>resources, connecting to</secondary></indexterm>
1337 <indexterm id="ch03-idx-948383-1"><primary>resources, connecting to</primary></indexterm>For the final step, the server returns a TID to the client, indicating that the user has been authorized access and that the resource is ready to be used. It also sets the <command>ServiceType</command> field to "A" to indicate that this is a file service. Available service types are:</para>
1341 <listitem><para> "A" for a disk or file</para></listitem>
1342 <listitem><para> "LPT1" for a spooled output</para></listitem>
1343 <listitem><para> "COMM" for a direct-connect printer or modem</para></listitem>
1344 <listitem><para> "IPC" for a named pipe</para></listitem>
1347 <para>The output is:</para>
1350 <programlisting>>>> NBT Packet
1355 SMB PACKET: SMBsesssetupX (REPLY)
1369 [000] Unix Samba 1.9.1
1372 SMB PACKET: SMBtconX (REPLY) (CHAINED)
1377 ServiceType=A:</programlisting>
1380 <para>Now that a TID has been assigned, the client may issue any sort of command that it would use on a local disk drive. It can open files, read and write to them, delete them, create new files, search for filenames, and so<indexterm id="ch03-idx-948291-0" class="endofrange" startref="ch03-idx-948288-0"/> on.<indexterm id="ch03-idx-947921-0" class="endofrange" startref="ch03-idx-947918-0"/>
1381 <indexterm id="ch03-idx-947921-1" class="endofrange" startref="ch03-idx-947918-1"/></para>