1<html> 2<body bgcolor="#ffffff"> 3 4<img src="samba2_xs.gif" border="0" alt=" " height="100" width="76" 5hspace="10" align="left" /> 6 7<h1 class="head0">Chapter 12. Troubleshooting Samba</h1> 8 9 10<p><a name="INDEX-1"/><a name="INDEX-2"/>Samba is extremely robust. Once you have 11everything set up the way you want, you'll probably 12forget that it is running. When trouble occurs, it's 13typically during installation or when you're trying 14to reconfigure the server. Fortunately, a wide variety of resources 15are available to diagnose these troubles. While we 16can't describe in detail the solution to every 17problem you might encounter, you should be able to get a good start 18at resolving the problem by following the advice given in this 19chapter.</p> 20 21<p>The first section of this chapter lists the tool bag, a collection of 22tools available for troubleshooting Samba; the second section is a 23detailed how-to; the last section lists extra resources to track down 24particularly stubborn problems.</p> 25 26 27 28<div class="sect1"><a name="samba2-CHP-12-SECT-1"/> 29 30<h2 class="head1">The Tool Box</h2> 31 32<p><a name="INDEX-3"/><a name="INDEX-4"/>Sometimes Unix 33seems to be made up of a grab bag of applications and tools. There 34are tools to troubleshoot tools. And of course, there are several 35ways to accomplish the same task. When trying to solve a problem 36related to Samba, a good plan of attack is to use the following:</p> 37 38<ul><li> 39<p>Samba logs</p> 40</li><li> 41<p>Samba test utilities</p> 42</li><li> 43<p>Unix utilities</p> 44</li><li> 45<p>Fault tree</p> 46</li><li> 47<p>Documentation and FAQs</p> 48</li><li> 49<p>Samba newsgroups</p> 50</li><li> 51<p>Searchable mailing list archives</p> 52</li></ul> 53<p>Let's go over each of these one-by-one in the 54following sections.</p> 55 56 57<div class="sect2"><a name="samba2-CHP-12-SECT-1.1"/> 58 59<h3 class="head2">Samba Logs</h3> 60 61<p><a name="INDEX-5"/><a name="INDEX-6"/>Your first line of attack should always 62be to check the log files. The Samba log files can help diagnose the 63vast majority of the problems faced by beginning- to 64intermediate-level Samba administrators. Samba is quite flexible when 65it comes to logging. You can set up the server to log as little or as 66much information as you want. Using substitution variables in the 67Samba configuration file allows you to isolate individual logs for 68each system, share, or combination thereof.</p> 69 70<p>Logs are placed in <em class="filename">/usr/local/samba/var/smbd.log</em> 71and <em class="filename">/usr/local/samba/var/nmbd.log</em> by default. 72You can specify a log directory to use with the 73<em class="emphasis">-l</em> flag on the command line when starting the 74Samba daemons. For example:</p> 75 76<blockquote><pre class="code"># <tt class="userinput"><b>smbd -l /var/log/samba</b></tt> 77# <tt class="userinput"><b>nmbd -l /var/log/samba</b></tt></pre></blockquote> 78 79<p>Alternatively, you can override the location and name using the 80<tt class="literal">log</tt><a name="INDEX-7"/> <tt class="literal">file</tt> configuration 81option in <em class="filename">smb.conf</em>. This option accepts all the 82substitution variables, so you could easily have the server keep a 83separate log for each connecting client system by specifying the 84following:</p> 85 86<blockquote><pre class="code">[global] 87 log file = %m.log</pre></blockquote> 88 89<p>Another useful trick is to have the server keep a log for each 90service (share) that is offered, especially if you suspect a 91particular share is causing trouble. To do this, use the 92<tt class="literal">%S</tt> variable, like this:</p> 93 94<blockquote><pre class="code">[global] 95 log file = %S.log</pre></blockquote> 96 97 98<div class="sect3"><a name="samba2-CHP-12-SECT-1.1.1"/> 99 100<h3 class="head3">Log levels</h3> 101 102<p><a name="INDEX-8"/>The level of logging that Samba uses 103can be set in the <em class="filename">smb.conf</em> file using the global 104<tt class="literal">log</tt> <tt class="literal">level</tt> or 105<tt class="literal">debug</tt> <tt class="literal">level</tt> option; they are 106equivalent. The logging level is an integer that can range from 0 to 10710. At level 0, no logging is done. Higher values result in more 108voluminous logging. For example, let's assume that 109we will use a Windows client to browse a directory on a Samba server. 110For a small amount of log information, you can use 111<tt class="literal">log</tt> <tt class="literal">level</tt> <tt class="literal">=</tt> 112<tt class="literal">1</tt>, which instructs Samba to show only cursory 113information, in this case only the connection itself:</p> 114 115<blockquote><pre class="code">05/25/02 22:02:11 server (192.168.236.86) connect to service public as user pcguest 116(uid=503,gid=100) (pid 3377)</pre></blockquote> 117 118<p>Higher debug levels produce more detailed information. Usually, you 119won't need more than level 3, which is fully 120adequate for most Samba administrators. Levels above 3 are used by 121the developers and dump enormous amounts of cryptic information.</p> 122 123<p>Here is an example of output at levels 2 and 3 for the same 124operation. Don't worry if you don't 125understand the intricacies of an SMB connection; the point is simply 126to show you what types of information are shown at the different 127<a name="INDEX-9"/>logging levels:</p> 128 129<blockquote><pre class="code"> /* Level 2 */ 130Got SIGHUP 131Processing section "[homes]" 132Processing section "[public]" 133Processing section "[temp]" 134Allowed connection from 192.168.236.86 (192.168.236.86) to IPC$ 135Allowed connection from 192.168.236.86 (192.168.236.86) to IPC/ 136 137 138/* Level 3 */ 13905/25/02 22:15:09 Transaction 63 of length 67 140switch message SMBtconX (pid 3377) 141Allowed connection from 192.168.236.86 (192.168.236.86) to IPC$ 142ACCEPTED: guest account and guest ok 143found free connection number 105 144Connect path is /tmp 145chdir to /tmp 146chdir to / 14705/25/02 22:15:09 server (192.168.236.86) connect to service IPC$ as user pcguest 148(uid=503,gid=100) (pid 3377) 14905/25/02 22:15:09 tconX service=ipc$ user=pcguest cnum=105 15005/25/02 22:15:09 Transaction 64 of length 99 151switch message SMBtrans (pid 3377) 152chdir to /tmp 153trans <\PIPE\LANMAN> data=0 params=19 setup=0 154Got API command 0 of form <WrLeh> <B13BWz> (tdscnt=0,tpscnt=19,mdrcnt=4096,mprcnt=8) 155Doing RNetShareEnum 156RNetShareEnum gave 4 entries of 4 (1 4096 126 4096) 15705/25/02 22:15:11 Transaction 65 of length 99 158switch message SMBtrans (pid 3377) 159chdir to / 160chdir to /tmp 161trans <\PIPE\LANMAN> data=0 params=19 setup=0 162Got API command 0 of form <WrLeh> <B13BWz> (tdscnt=0,tpscnt=19,mdrcnt=4096,mprcnt=8) 163Doing RNetShareEnum 164RNetShareEnum gave 4 entries of 4 (1 4096 126 4096) 16505/25/02 22:15:11 Transaction 66 of length 95 166switch message SMBtrans2 (pid 3377) 167chdir to / 168chdir to /pcdisk/public 169call_trans2findfirst: dirtype = 0, maxentries = 6, close_after_first=0, close_if_end 170= 0 requires_resume_key = 0 level = 260, max_data_bytes = 2432 171unix_clean_name [./DESKTOP.INI] 172unix_clean_name [desktop.ini] 173unix_clean_name [./] 174creating new dirptr 1 for path ./, expect_close = 1 17505/25/02 22:15:11 Transaction 67 of length 53 176switch message SMBgetatr (pid 3377) 177chdir to / 178 179<i class="lineannotation">[... deleted ...]</i></pre></blockquote> 180 181<p>We cut off this listing after the first packet because it runs on for 182many pages. However, be aware that log levels above 3 will quickly 183consume disk space with megabytes of excruciating detail concerning 184Samba's internal operations. Log level 3 is 185extremely useful for following exactly what the server is doing, and 186most of the time it will be obvious where an error occurs by glancing 187through the log file.</p> 188 189<p>Using a high log level (3 or above) will 190<em class="emphasis">seriously</em> slow down the Samba server. Remember 191that every log message generated causes a write to disk (an 192inherently slow operation) and log levels greater than 2 produce 193massive amounts of data. Essentially, you should turn on logging 194level 3 only when you're actively tracking a problem 195in the Samba server. <a name="INDEX-10"/></p> 196 197 198</div> 199 200 201 202<div class="sect3"><a name="samba2-CHP-12-SECT-1.1.2"/> 203 204<h3 class="head3">Activating and deactivating logging</h3> 205 206<p><a name="INDEX-11"/><a name="INDEX-12"/>To turn logging on and off, 207set the appropriate level in the <tt class="literal">[global]</tt> section 208of <em class="filename">smb.conf</em>. Then, you can either restart Samba 209or force the current daemon to reprocess the configuration file by 210sending it a hangup (HUP) signal. You also can send the 211<em class="emphasis">smbd</em> process a SIGUSR1 signal to increase its 212log level by one while it's running, like this:</p> 213 214<blockquote><pre class="code"># <tt class="userinput"><b>kill -SIGUSR1 1234</b></tt></pre></blockquote> 215 216<p>or a SIGUSR2 signal to decrease it by one:</p> 217 218<blockquote><pre class="code"># <tt class="userinput"><b>kill -SIGUSR2 1234</b></tt></pre></blockquote> 219 220 221</div> 222 223 224 225<div class="sect3"><a name="samba2-CHP-12-SECT-1.1.3"/> 226 227<h3 class="head3">Logging by individual client systems or users</h3> 228 229<p>An effective way to diagnose problems without hampering other users 230is to assign different log levels for different systems in the 231<tt class="literal">[global]</tt> section of the 232<em class="filename">smb.conf</em> file. We can do this by building on the 233strategy we presented earlier:</p> 234 235<blockquote><pre class="code">[global] 236 log level = 0 237 log file = /usr/local/samba/var/log.%m 238 include = /usr/local/samba/lib/smb.conf.%m</pre></blockquote> 239 240<p>These options instruct Samba to use unique configuration and log 241files for each client that connects. Now all you have to do is create 242an <em class="filename">smb.conf</em> file for a specific client system 243with a <tt class="literal">log</tt> <tt class="literal">level</tt> 244<tt class="literal">=</tt> <tt class="literal">3</tt> entry in it (the others 245will pick up the default log level of 0) and use that log file to 246track down the problem.</p> 247 248<p>Similarly, if only particular users are experiencing a 249problem—and it travels from system to system with 250them—you can isolate logging to a specific user by adding the 251following to the <em class="filename">smb.conf</em> file:</p> 252 253<blockquote><pre class="code">[global] 254 log level = 0 255 log file = /usr/local/samba/var/log.%u 256 include = /usr/local/samba/lib/smb.conf.%u</pre></blockquote> 257 258<p>Then you can create a unique <em class="filename">smb.conf</em> file for 259each user you wish to monitor (e.g., 260<em class="filename">/usr/local/samba/lib/smb.conf.tim</em>). Files 261containing the configuration option <tt class="literal">log</tt> 262<tt class="literal">level</tt> <tt class="literal">=</tt> <tt class="literal">3</tt> 263and only those users will get more detailed logging.<a name="INDEX-13"/><a name="INDEX-14"/></p> 264 265 266</div> 267 268 269</div> 270 271 272<div class="sect2"><a name="samba2-CHP-12-SECT-1.2"/> 273 274<h3 class="head2">Samba Test Utilities</h3> 275 276<p><a name="INDEX-15"/><a name="INDEX-16"/>A rigorous set of tests that exercise 277the major parts of Samba are described in various files in the 278<em class="emphasis">/docs/textdocs</em> directory of the Samba 279distribution kit, starting with <em class="emphasis">DIAGNOSIS.txt</em>. 280The fault tree in this chapter is a more detailed version of the 281basic tests suggested by the Samba Team, but it covers only 282installation and reconfiguration diagnosis, such as 283<em class="emphasis">DIAGNOSIS.txt</em>. The other files in the 284<em class="emphasis">/docs</em> subdirectories address specific problems 285and instruct you how to troubleshoot items not included in this book. 286If the fault tree doesn't suffice, be sure to look 287at 288<em class="emphasis">DIAGNOSIS.txt</em><a name="INDEX-17"/> 289and its friends.</p> 290 291 292</div> 293 294 295<div class="sect2"><a name="samba2-CHP-12-SECT-1.3"/> 296 297<h3 class="head2">Unix Utilities</h3> 298 299<p>Sometimes it's useful to use a tool outside the 300Samba suite to examine what's happening inside the 301server. Three diagnostic tools can be of particular help in debugging 302Samba troubles: <em class="emphasis">trace</em>, 303<em class="emphasis">tcpdump</em>, and <em class="emphasis">Ethereal</em>.</p> 304 305 306<div class="sect3"><a name="samba2-CHP-12-SECT-1.3.1"/> 307 308<h3 class="head3">Using trace</h3> 309 310<p>The <em class="emphasis">trace</em><a name="INDEX-18"/> command masquerades under several 311different names, depending on the operating system you are using. On 312Linux it will be 313<em class="emphasis">strace</em><a name="INDEX-19"/>; on Solaris you'll use 314<em class="emphasis">truss</em><a name="INDEX-20"/>; SGI will have 315<em class="emphasis">padc</em><a name="INDEX-21"/> and 316<em class="emphasis">par</em><a name="INDEX-22"/>; and HP-UX will have 317<em class="emphasis">trace</em> or 318<em class="emphasis">tusc</em><a name="INDEX-23"/>. All have essentially the same 319function, which is to display each operating system function call as 320it is executed. This allows you to follow the execution of a program, 321such as the Samba server, and often pinpoints the exact call that is 322causing the difficulty.</p> 323 324<p>One problem that <em class="emphasis">trace</em> can highlight is an 325incorrect version of a dynamically linked library. This can happen if 326you've downloaded prebuilt binaries of Samba. 327You'll typically see the offending call at the end 328of the <em class="emphasis">trace</em>, just before the program 329terminates.</p> 330 331<p>A sample <em class="emphasis">strace</em> output for the Linux operating 332system follows. This is a small section of a larger file created 333during the opening of a directory on the Samba server. Each line 334lists a system call and includes its parameters and the return value. 335If there was an error, the error value (e.g., 336<tt class="literal">ENOENT</tt>) and its explanation are also shown. You 337can look up the parameter types and the errors that can occur in the 338appropriate <em class="emphasis">trace</em> manual page for the operating 339system you are using.</p> 340 341<blockquote><pre class="code">chdir("/pcdisk/public") = 0 342stat("mini/desktop.ini", 0xbffff7ec) = -1 ENOENT (No such file or directory) 343stat("mini", {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0 344stat("mini/desktop.ini", 0xbffff7ec) = -1 ENOENT (No such file or directory) 345open("mini", O_RDONLY) = 5 346fcntl(5, F_SETFD, FD_CLOEXEC) = 0 347fstat(5, {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0 348lseek(5, 0, SEEK_CUR) = 0 349SYS_141(0x5, 0xbfffdbbc, 0xedc, 0xbfffdbbc, 0x80ba708) = 196 350lseek(5, 0, SEEK_CUR) = 1024 351SYS_141(0x5, 0xbfffdbbc, 0xedc, 0xbfffdbbc, 0x80ba708) = 0 352close(5) = 0 353stat("mini/desktop.ini", 0xbffff86c) = -1 ENOENT (No such file or directory) 354write(3, "\0\0\0#\377SMB\10\1\0\2\0\200\1\0"..., 39) = 39 355SYS_142(0xff, 0xbffffc3c, 0, 0, 0xbffffc08) = 1 356read(3, "\0\0\0?", 4) = 4 357read(3, "\377SMBu\0\0\0\0\0\0\0\0\0\0\0\0"..., 63) = 63 358time(NULL) = 896143871</pre></blockquote> 359 360<p>This example shows several <em class="emphasis">stat() calls</em> failing 361to find the files they were expecting. You don't 362have to be an expert to see that the file 363<em class="emphasis">desktop.ini</em> is missing from that directory. In 364fact, many difficult problems can be identified by looking for 365obvious, repeatable errors with <em class="emphasis">trace</em>. Often, 366you need not look further than the last message before a crash.</p> 367 368 369</div> 370 371 372 373<div class="sect3"><a name="samba2-CHP-12-SECT-1.3.2"/> 374 375<h3 class="head3">Using tcpdump</h3> 376 377<p>The <em class="emphasis">tcpdump</em><a name="INDEX-24"/> program, as extended by Andrew 378<a name="INDEX-25"/>Tridgell, 379allows you to monitor SMB <a name="INDEX-26"/>network 380traffic in real time. A variety of output formats are available, and 381you can filter the output to look at only a particular type of 382traffic. You can examine all conversations between client and server, 383including SMB and NMB broadcast messages. While its troubleshooting 384capabilities lie mainly at the OSI network layer, you can still use 385its output to get a general idea of what the server and client are 386attempting to do.</p> 387 388<p>A sample <em class="emphasis">tcpdump</em> log follows. In this instance, 389the client has requested a directory listing, and the server has 390responded appropriately, giving the directory names 391<tt class="literal">homes</tt>, <tt class="literal">public</tt>, 392<tt class="literal">IPC$</tt>, and <tt class="literal">temp</tt> 393(we've added a few explanations on the right):</p> 394 395<blockquote><pre class="code">$ <tt class="userinput"><b>tcpdump -v -s 255 -i eth0 port not telnet</b></tt> 396SMB PACKET: SMBtrans (REQUEST) <i class="lineannotation"> Request packet</i> 397SMB Command = 0x25 <i class="lineannotation">Request was ls or dir</i> 398 399[000] 01 00 00 10 <i class="lineannotation">....</i> 400 401 402>>> NBT Packet <i class="lineannotation">Outer frame of SMB packet</i> 403NBT Session Packet 404Flags=0x0 405Length=226 406[lines skipped] 407 408SMB PACKET: SMBtrans (REPLY) <i class="lineannotation">Beginning of a reply to request</i> 409SMB Command = 0x25 <i class="lineannotation">Command was an ls or dir</i> 410Error class = 0x0 411Error code = 0 <i class="lineannotation">No errors</i> 412Flags1 = 0x80 413Flags2 = 0x1 414Tree ID = 105 415Proc ID = 6075 416UID = 100 417MID = 30337 418Word Count = 10 419TotParamCnt=8 420TotDataCnt=163 421Res1=0 422ParamCnt=8 423ParamOff=55 424Res2=0 425DataCnt=163 426DataOff=63 427Res3=0 428Lsetup=0 429Param Data: (8 bytes) 430[000] 00 00 00 00 05 00 05 00 ........ 431 432Data Data: (135 bytes) <i class="lineannotation">Actual directory contents:</i> 433[000] 68 6F 6D 65 73 00 00 00 00 00 00 00 00 00 00 00 homes... ........ 434[010] 64 00 00 00 70 75 62 6C 69 63 00 00 00 00 00 00 d...publ ic...... 435[020] 00 00 00 00 75 00 00 00 74 65 6D 70 00 00 00 00 ....u... temp.... 436[030] 00 00 00 00 00 00 00 00 76 00 00 00 49 50 43 24 ........ v...IPC$ 437[040] 00 00 00 00 00 00 00 00 00 00 03 00 77 00 00 00 ........ ....w... 438[050] 64 6F 6E 68 61 6D 00 00 00 00 00 00 00 00 00 00 donham.. ........ 439[060] 92 00 00 00 48 6F 6D 65 20 44 69 72 65 63 74 6F ....Home Directo 440[070] 72 69 65 73 00 00 00 49 50 43 20 53 65 72 76 69 ries...I PC Servi 441[080] 63 65 20 28 53 61 6D ce (Sam</pre></blockquote> 442 443<p>This is more of the same debugging session as we saw before with the 444<em class="emphasis">trace</em> command: the listing of a directory. The options 445we used were <em class="emphasis">-v</em> (verbose), <em class="emphasis">-i 446eth0</em> to tell <em class="emphasis">tcpdump</em> on which 447interface to listen (an Ethernet port), and <em class="emphasis">-s 448255</em> to tell it to save the first 255 bytes of each packet 449instead of the default: the first 68. The option 450<tt class="literal">port</tt> <tt class="literal">not</tt> 451<tt class="literal">telnet</tt> is used to avoid screens of telnet traffic, 452because we were logged in to the server remotely. The 453<em class="emphasis">tcpdump</em> program actually has quite a number of 454options to filter just the traffic you want to look at. If 455you've used <em class="emphasis">snoop</em> or 456<em class="emphasis">etherdump</em>, it will look vaguely familiar.</p> 457 458<p>You can download the modified <em class="emphasis">tcpdump</em> from the 459Samba FTP server, located at 460<a href="ftp://samba.anu.edu.au/pub/samba/tcpdump-smb">ftp://samba.anu.edu.au/pub/samba/tcpdump-smb</a>. 461Other versions might not include support for the SMB protocol; if you 462don't see output such as that shown in the example, 463you'll need to use the SMB-enabled version.</p> 464 465 466</div> 467 468 469 470<div class="sect3"><a name="samba2-CHP-12-SECT-1.3.3"/> 471 472<h3 class="head3">Using Ethereal</h3> 473 474<p><a name="INDEX-27"/>Ethereal (<a href="http://www.ethereal.com">http://www.ethereal.com</a>) is a GUI-based 475utility that performs the same basic function as 476<em class="emphasis">tcpdump</em>. You might prefer Ethereal because it is 477much easier to use. Once you have Ethereal running, just do the 478following:</p> 479 480<ol><li> 481<p>Select Start from the Capture menu.</p> 482</li><li> 483<p>Click the OK button in the dialog box that appears. This will bring 484up a dialog box showing how many packets Ethereal has seen. Perform 485the actions on the system(s) in your network to reproduce the problem 486you are analyzing.</p> 487</li><li> 488<p>Click the Stop button in the Ethereal dialog box to make it finish 489collecting data.</p> 490</li><li> 491<p>In the main Ethereal window, click any item in the upper window to 492view it in the lower window. In the lower window, click any of the 493boxes containing a plus sign (<tt class="literal">+</tt>) to expand the 494view.</p> 495</li></ol> 496<p>Ethereal does a good job of translating the content of the packets it 497encounters into human-readable format, and you should have little 498trouble seeing what happened on the network during the capture 499period. <a name="INDEX-28"/><a name="INDEX-29"/></p> 500 501 502</div> 503 504 505</div> 506 507 508</div> 509 510 511 512<div class="sect1"><a name="samba2-CHP-12-SECT-2"/> 513 514<h2 class="head1">The Fault Tree</h2> 515 516<p><a name="INDEX-30"/><a name="INDEX-31"/><a name="INDEX-32"/><a name="INDEX-33"/>The fault 517tree presented in this section is for diagnosing and fixing problems 518that occur when you're installing and reconfiguring 519Samba. It's an expanded form of the trouble and 520diagnostic document <em class="filename">DIAGNOSIS.txt</em>, which is part 521of the Samba distribution.</p> 522 523<p>Before you set out to troubleshoot any part of the Samba suite, you 524should know the following information:</p> 525 526<ul><li> 527<p>Your client IP address (we use 192.168.236.10)</p> 528</li><li> 529<p>Your server IP address (we use 192.168.236.86)</p> 530</li><li> 531<p>The netmask for your network (typically 255.255.255.0)</p> 532</li><li> 533<p>Whether the systems are all on the same subnet (ours are)</p> 534</li></ul> 535<p>For clarity, we've renamed the server in the 536following examples to <tt class="literal">server.example.com</tt>, and the 537client system to <tt class="literal">client.example.com</tt>.</p> 538 539 540<div class="sect2"><a name="samba2-CHP-12-SECT-2.1"/> 541 542<h3 class="head2">How to Use the Fault Tree</h3> 543 544<p>Start the tests here, without skipping forward; it 545won't take long (about 5 minutes) and might actually 546save you time backtracking. Whenever a test succeeds, you will be 547given a name of a section to which you can safely skip.</p> 548 549 550</div> 551 552 553<div class="sect2"><a name="samba2-CHP-12-SECT-2.2"/> 554 555<h3 class="head2">Troubleshooting Low-Level IP</h3> 556 557<p><a name="INDEX-34"/>The 558first series of tests is that of the low-level services that Samba 559needs to run. The tests in this section verify that:</p> 560 561<ul><li> 562<p>The IP software works</p> 563</li><li> 564<p>The Ethernet hardware works</p> 565</li><li> 566<p>Basic name service is in place</p> 567</li></ul> 568<p>Subsequent sections add TCP software, the Samba daemons 569<em class="emphasis">smbd</em> and <em class="emphasis">nmbd</em>, host-based 570access control, authentication and per-user access control, file 571services, and browsing. The tests are described in considerable 572detail to make them understandable by both technically oriented end 573users and experienced systems and network administrators.</p> 574 575 576<div class="sect3"><a name="samba2-CHP-12-SECT-2.2.1"/> 577 578<h3 class="head3">Testing the networking software with ping</h3> 579 580<p><a name="INDEX-35"/>The first command to enter 581on both the server and the client is 582<tt class="literal">ping</tt><a name="INDEX-36"/><a name="INDEX-37"/> 583<tt class="literal">127.0.0.1</tt>. This pings the loopback address and 584indicates whether any networking support is functioning. On Unix, you 585can use <tt class="literal">ping</tt> <tt class="literal">127.0.0.1</tt> with the 586statistics option and interrupt it after a few lines. On Sun 587workstations, the command is typically 588<tt class="literal">/usr/etc/ping</tt> <tt class="literal">-s</tt> 589<tt class="literal">127.0.0.1</tt>; on Linux, just <tt class="literal">ping</tt> 590<tt class="literal">127.0.0.1</tt>. On Windows clients, run 591<tt class="literal">ping</tt> <tt class="literal">127.0.0.1</tt> in an MS-DOS 592(command prompt) window, and it will stop by itself after four lines.</p> 593 594<p>Here is an example on a Linux server:</p> 595 596<blockquote><pre class="code">$ <tt class="userinput"><b>ping 127.0.0.1 </b></tt> 597PING localhost: 56 data bytes 64 bytes from localhost (127.0.0.1): 598icmp-seq=0. time=1. ms 64 bytes from localhost (127.0.0.1): 599icmp-seq=1. time=0. ms 64 bytes from localhost (127.0.0.1): 600icmp-seq=2. time=1. ms ^C 601----127.0.0.1 PING Statistics---- 6023 packets transmitted, 3 packets received, 0% packet loss round-trip (ms) 603min/avg/max = 0/0/1</pre></blockquote> 604 605<p>If you get "ping: no answer from . . . 606" or "100% packet 607loss," you have no IP networking installed on the 608system. The address <tt class="literal">127.0.0.1</tt> is the internal 609loopback address and doesn't depend on the computer 610being physically connected to a network. If this test fails, you have 611a serious local problem. TCP/IP either isn't 612installed or is seriously misconfigured. See your operating system 613documentation if it's a Unix server. If 614it's a Windows client, follow the instructions in 615<a href="ch03.html">Chapter 3</a> to install networking support.</p> 616 617<a name="samba2-CHP-12-NOTE-155"/><blockquote class="note"><h4 class="objtitle">TIP</h4> 618<p>If <em class="emphasis">you're</em> the network manager, 619some good references are Craig Hunt's 620<em class="emphasis">TCP/IP Network Administration</em>, Chapter 11, and Craig Hunt and Robert Bruce 621Thompson's <em class="emphasis">Windows NT TCP/IP Network 622Administration</em>, both published by 623O'Reilly.</p> 624</blockquote> 625 626 627</div> 628 629 630 631<div class="sect3"><a name="samba2-CHP-12-SECT-2.2.2"/> 632 633<h3 class="head3">Testing local name services with ping</h3> 634 635<p><a name="INDEX-38"/>Next, try to ping 636<tt class="literal">localhost</tt> on the Samba server. The 637<tt class="literal">localhost</tt> hostname is the conventional hostname 638for the <tt class="literal">127.0.0.1</tt> loopback interface, and it 639should resolve to that address. After typing <tt class="literal">ping</tt> 640<tt class="literal">localhost</tt>, you should see output similar to the 641following:</p> 642 643<blockquote><pre class="code">$ <tt class="userinput"><b>ping localhost </b></tt> 644PING localhost: 56 data bytes 64 bytes from localhost (127.0.0.1): 645icmp-seq=0. time=0. ms 64 bytes from localhost (127.0.0.1): 646icmp-seq=1. time=0. ms 64 bytes from localhost (127.0.0.1): 647icmp-seq=2. time=0. ms ^C</pre></blockquote> 648 649<p>If this succeeds, try the same test on the client. Otherwise:</p> 650 651<ul><li> 652<p>If you get "unknown host: 653localhost," there is a problem resolving the 654hostname <em class="filename">localhost</em> into a valid IP address. 655(This might be as simple as a missing entry in a local 656<em class="emphasis">hosts</em> file.) From here, skip down to 657<a href="ch03.html#samba2-CHP-12-SECT-2.7">Section 12.2.7</a> later in this chapter.</p> 658</li><li> 659<p>If you get "ping: no answer," or 660"100% packet loss," but pinging 661<tt class="literal">127.0.0.1</tt> worked, name services is resolving to an 662address, but it isn't the correct one. Check the 663file or database (typically <em class="filename">/etc/hosts</em> on a Unix 664system) that the name service is using to resolve addresses to ensure 665that the entry is correct.</p> 666</li></ul> 667 668</div> 669 670 671 672<div class="sect3"><a name="samba2-CHP-12-SECT-2.2.3"/> 673 674<h3 class="head3">Testing the networking hardware with ping</h3> 675 676<p><a name="INDEX-39"/>Next, ping the 677server's network IP address from itself. This should 678get you exactly the same results as pinging 679<tt class="literal">127.0.0.1</tt>:</p> 680 681<blockquote><pre class="code">$ <tt class="userinput"><b>ping 192.168.236.86 </b></tt> 682PING 192.168.236.86: 56 data bytes 64 bytes from 192.168.236.86 (192.168.236.86): 683icmp-seq=0. time=1. ms 64 bytes from 192.168.236.86 (192.168.236.86): 684icmp-seq=1. time=0. ms 64 bytes from 192.168.236.86 (192.168.236.86): 685icmp-seq=2. time=1. ms ^C 686----192.168.236.86 PING Statistics---- 6873 packets transmitted, 3 packets received, 0% packet loss round-trip (ms) 688min/avg/max = 0/0/1</pre></blockquote> 689 690<p>If this works on the server, repeat it for the client. Otherwise:</p> 691 692<ul><li> 693<p>If <tt class="literal">ping</tt> <em class="replaceable">network_ip</em> 694fails on either the server or client, but <tt class="literal">ping</tt> 695<tt class="literal">127.0.0.1</tt> works on that system, you have a TCP/IP 696problem that is specific to the Ethernet network interface card on 697the computer. Check with the documentation for the network card or 698host operating system to determine how to configure it correctly. 699However, be aware that on some operating systems, the 700<em class="emphasis">ping</em> command appears to work even if the network 701is disconnected, so this test doesn't always 702diagnose all hardware problems.</p> 703</li></ul> 704 705</div> 706 707 708 709<div class="sect3"><a name="samba2-CHP-12-SECT-2.2.4"/> 710 711<h3 class="head3">Testing connections with ping</h3> 712 713<p><a name="INDEX-40"/>Now, ping the server by name (instead 714of its IP address)—once from the server and once from the 715client. This is the general test for working network hardware:</p> 716 717<blockquote><pre class="code">$ <tt class="userinput"><b>ping server </b></tt> 718PING server.example.com: 56 data bytes 64 bytes from server.example.com (192.168.236.86): 719icmp-seq=0. time=1. ms 64 bytes from server.example.com (192.168.236.86): 720icmp-seq=1. time=0. ms 64 bytes from server.example.com (192.168.236.86): 721icmp-seq=2. time=1. ms ^C 722----server.example.com PING Statistics---- 7233 packets transmitted, 3 packets received, 0% packet loss round-trip (ms) 724min/avg/max = 0/0/1</pre></blockquote> 725 726<p>If successful, this test tells us five things:</p> 727 728<ul><li> 729<p>The hostname (e.g., <tt class="literal">server</tt>) is being found by your 730local name server.</p> 731</li><li> 732<p>The hostname has been expanded to the full name (e.g., 733<tt class="literal">server.example.com</tt>).</p> 734</li><li> 735<p>Its address is being returned (<tt class="literal">192.168.236.86</tt>).</p> 736</li><li> 737<p>The client has sent the Samba server four 56-byte UDP/IP packets.</p> 738</li><li> 739<p>The Samba server has replied to all four packets.</p> 740</li></ul> 741<p>If this test isn't successful, one of several things 742can be wrong with the network:</p> 743 744<ul><li> 745<p>First, if you get <tt class="literal">ping</tt>: <tt class="literal">no</tt> 746<tt class="literal">answer</tt>, or <tt class="literal">100%</tt> 747<tt class="literal">packet</tt> <tt class="literal">loss</tt>, 748you're not connecting to the network, the other 749system isn't connecting, or one of the addresses is 750incorrect. Check the addresses that the <em class="emphasis">ping</em> 751command reports on each system, and ensure that they match the ones 752you set up initially.</p> 753 754<p>If not, there is at least one mismatched address between the two 755systems. Try entering the command <tt class="literal">arp</tt> 756<tt class="literal">-a</tt>, and see if there is an entry for the other 757system. (The <em class="emphasis">arp</em> command stands for the Address 758Resolution Protocol. The <tt class="literal">arp</tt> <tt class="literal">-a</tt> 759command lists all the addresses known on the local system.) Here are 760some things to try:</p> 761<ul><li> 762<p>If you receive a message like <tt class="literal">192.168.236.86</tt> 763<tt class="literal">at</tt> <tt class="literal">(incomplete)</tt>, the Ethernet 764address of 192.168.236.86 is unknown. This indicates a complete lack 765of connectivity, and you're likely having a problem 766at the very bottom of the TCP/IP protocol stack—the Ethernet 767interface layer. This is discussed in Chapters 5 and 6 of 768<em class="citetitle">TCP/IP Network Administration 769</em>(O'Reilly).</p> 770</li><li> 771<p>If you receive a response similar to server 772<tt class="literal">(192.168.236.86)</tt> <tt class="literal">at</tt> 773<tt class="literal">8:0:20:12:7c:94</tt>, the server has been reached at 774some time, or another system is answering on its behalf. However, 775this means that <em class="emphasis">ping</em> should have worked: you may 776have an intermittent networking or ARP problem.</p> 777</li><li> 778<p>If the IP address from ARP doesn't match the 779addresses you expected, investigate and correct the addresses 780manually.</p> 781</li> 782</ul> 783</li> 784 785<li> 786<p>If each system can ping itself but not another, something is wrong on 787the network between them.</p> 788</li><li> 789<p>If you get <tt class="literal">ping</tt>: <tt class="literal">network</tt> 790<tt class="literal">unreachable</tt> or <tt class="literal">ICMP</tt> 791<tt class="literal">Host</tt> <tt class="literal">Unreachable</tt>, 792you're not receiving an answer, and more than one 793network is probably involved.</p> 794 795<p>In principle, you shouldn't try to troubleshoot SMB 796clients and servers on different networks. Try to test a server and 797client that are on the same network:</p> 798 799<ol><li> 800<p>First, perform the tests for <tt class="literal">ping</tt>: 801<tt class="literal">no</tt> <tt class="literal">answer</tt> described earlier in 802this section. If this doesn't identify the problem, 803the remaining possibilities are the following: an address is wrong, 804your netmask is wrong, a network is down, or the packets have been 805stopped by a firewall.</p> 806</li> 807<li> 808<p>Check both the address and the netmasks on source and destination 809systems to see if something is obviously wrong. Assuming both systems 810really are on the same network, they both should have the same 811netmasks, and <em class="emphasis">ping</em> should report the correct 812addresses. If the addresses are wrong, you'll need 813to correct them. If they are correct, the programs might be confused 814by an incorrect netmask. See <a href="ch12.html#samba2-CHP-12-SECT-2.8.1">Section 12.2.8.1</a>, later in this chapter.</p> 815</li> 816<li> 817<p>If the commands are still reporting that the network is unreachable 818and neither of the previous two conditions are in error, one network 819really might be unreachable from the other. This, too, is an issue 820for the network manager.</p> 821</li></ol> 822</li><li> 823<p>If you get <tt class="literal">ICMP</tt> 824<tt class="literal">Administratively</tt> <tt class="literal">Prohibited</tt>, 825you've struck a firewall of some sort or a 826misconfigured router. You will need to speak to your network security 827officer.</p> 828</li><li> 829<p>If you get <tt class="literal">ICMP</tt> <tt class="literal">Host</tt> 830<tt class="literal">redirect</tt> and <em class="emphasis">ping</em> reports 831packets getting through, this is generally harmless: 832you're simply being rerouted over the network.</p> 833</li><li> 834<p>If you get a host redirect and no <em class="emphasis">ping</em> 835responses, you are being redirected, but no one is responding. Treat 836this just like the <tt class="literal">Network</tt> 837<tt class="literal">unreachable</tt> response, and check your addresses and 838netmasks.</p> 839</li><li> 840<p>If you get <tt class="literal">ICMP</tt> <tt class="literal">Host</tt> 841<tt class="literal">Unreachable</tt> <tt class="literal">from</tt> 842<tt class="literal">gateway</tt> <tt class="literal">gateway</tt> 843<tt class="literal">name</tt>, ping packets are being routed to another 844network, but the other system isn't responding and 845the router is reporting the problem on its behalf. Again, treat this 846like a <tt class="literal">Network</tt> <tt class="literal">unreachable</tt> 847response, and start checking addresses and netmasks.</p> 848</li><li> 849<p>If you get <tt class="literal">ping</tt>: <tt class="literal">unknown</tt> 850<tt class="literal">host</tt> <tt class="literal">hostname</tt>, your 851system's name is not known. This tends to indicate a 852name service problem, which didn't affect 853<tt class="literal">localhost</tt>. Have a look at <a href="ch12.html#samba2-CHP-12-SECT-2.7">Section 12.2.7</a>, later in this chapter.</p> 854</li><li> 855<p>If you get a partial success—with some pings failing but others 856succeeding—you have either an intermittent problem between the 857systems or an overloaded network. Ping a bit longer, and see if more 858than about three percent of the packets fail. If so, check it with 859your network manager: a problem might just be starting. However, if 860only a few fail, or if you happen to know some massive network 861program is running, don't worry unduly. The ICMP 862(and UDP) protocols used by <em class="emphasis">ping</em> are allowed to 863drop occasional packets.</p> 864</li><li> 865<p>If you get a response such as <tt class="literal">smtsvr.antares.net</tt> 866<tt class="literal">is</tt> <tt class="literal">alive</tt> when you actually 867pinged <tt class="literal">client.example.com</tt>, either 868you're using someone else's address 869or the system has multiple names and addresses. If the address is 870wrong, the name service is clearly the culprit; 871you'll need to change the address in the name 872service database to refer to the correct system. This is discussed in 873<a href="ch12.html#samba2-CHP-12-SECT-2.7">Section 12.2.7</a>, later in this 874chapter.</p> 875 876<p>Servers are often <em class="emphasis">multihomed</em> —i.e., 877connected to more than one network, with different names on each net. 878If you are getting a response from an unexpected name on a multihomed 879server, look at the address and see if it's on your 880network (see <a href="ch12.html#samba2-CHP-12-SECT-2.8.1">Section 12.2.8.1</a>, later in this chapter). If 881so, you should use that address, rather than one on a different 882network, for both performance and reliability reasons.</p> 883 884<p>Servers can also have multiple names for a single Ethernet address, 885especially if they are web servers. This is harmless, albeit 886startling. You probably will want to use the official (and permanent) 887name, rather than an alias that might change.</p> 888</li><li> 889<p>If everything works but the IP address reported is 890<tt class="literal">127.0.0.1</tt>, you have a name service error. This 891typically occurs when an operating-system installation program 892generates an <em class="filename">/etc/hosts</em> line similar to 893<tt class="literal">127.0.0.1</tt> <tt class="literal">localhost</tt> 894<em class="emphasis">hostname.domainname</em>. The localhost line should 895say <tt class="literal">127.0.0.1</tt> <tt class="literal">localhost</tt> or 896<tt class="literal">127.0.0.1</tt> <tt class="literal">localhost</tt> 897<tt class="literal">loghost</tt>. Correct it, lest it cause failures to 898negotiate who is the master browse list holder and who is the master 899browser. It can also cause (ambiguous) errors in later tests.</p> 900</li></ul> 901<p>If this worked from the server, repeat it from the client. <a name="INDEX-41"/> 902<a name="INDEX-42"/><a name="INDEX-43"/></p> 903 904 905</div> 906 907 908</div> 909 910 911<div class="sect2"><a name="samba2-CHP-12-SECT-2.3"/> 912 913<h3 class="head2">Troubleshooting TCP</h3> 914 915<p><a name="INDEX-44"/><a name="INDEX-45"/>Now that 916you've tested IP, UDP, and a name service with 917<em class="emphasis">ping</em>, it's time to test TCP. 918Browsing and <em class="emphasis">ping</em> use ICMP and UDP; file and 919print services (shares) use TCP. Both depend on IP as a lower layer, 920and all four depend on name services. Testing TCP is most 921conveniently done using the FTP program.</p> 922 923 924<div class="sect3"><a name="samba2-CHP-12-SECT-2.3.1"/> 925 926<h3 class="head3">Testing TCP with FTP</h3> 927 928<p>Try connecting via FTP, once from the server to itself, and once from 929the client to the server:</p> 930 931<blockquote><pre class="code">$ <tt class="userinput"><b>ftp server</b></tt> 932Connected to server.example.com. 933220 server.example.com FTP server (Version 6.2/OpenBSD/Linux-0.10) ready. 934 Name (server:davecb): 935331 Password required for davecb. 936Password: 937230 User davecb logged in. 938 ftp><tt class="userinput"><b> quit </b></tt> 939221 Goodbye.</pre></blockquote> 940 941<p>If this worked, skip to the next section, <a href="ch12.html#samba2-CHP-12-SECT-2.4">Section 12.2.4</a>. Otherwise:</p> 942 943<ul><li> 944<p>If you received the message <tt class="literal">server</tt>: 945<tt class="literal">unknown</tt> <tt class="literal">host</tt>, name service has 946failed. Go back to the corresponding <em class="emphasis">ping</em> step, 947<a href="ch12.html#samba2-CHP-12-SECT-2.2.2">Section 12.2.2.2</a>, and rerun those tests 948to see why name lookup failed.</p> 949</li><li> 950<p>If you received <tt class="literal">ftp</tt>: <tt class="literal">connect</tt>: 951<tt class="literal">Connection</tt> <tt class="literal">refused</tt>, the system 952isn't running an FTP daemon. This is mildly unusual 953on Unix servers. Optionally, you might try this test by connecting to 954the system using <em class="emphasis">telnet</em> instead of 955<em class="emphasis">ftp</em>; the messages are very similar, and 956<em class="emphasis">telnet</em> uses TCP as well.</p> 957</li><li> 958<p>If there was a long pause, and then <tt class="literal">ftp</tt>: 959<tt class="literal">connect</tt>: <tt class="literal">Connection</tt> 960<tt class="literal">timed</tt> <tt class="literal">out</tt>, the system 961isn't reachable. Return to <a href="ch12.html#samba2-CHP-12-SECT-2.2.4">Section 12.2.2.4</a>.</p> 962</li><li> 963<p>If you received <tt class="literal">530</tt> <tt class="literal">Logon</tt> 964<tt class="literal">Incorrect</tt>, you connected successfully, but 965you've just found a different problem. You likely 966provided an incorrect username or password. Try again, making sure 967you use your username from the Unix server and type your password 968correctly.</p> 969</li></ul> 970 971</div> 972 973 974</div> 975 976 977<div class="sect2"><a name="samba2-CHP-12-SECT-2.4"/> 978 979<h3 class="head2">Troubleshooting Server Daemons</h3> 980 981<p><a name="INDEX-46"/>Once 982you've confirmed that TCP networking is working 983properly, the next step is to make sure the daemons are running on 984the server. This takes three separate tests because no single one of 985the following will decisively prove that they're 986working correctly.</p> 987 988<p>To be sure they're running, you need to find out 989whether the daemons:</p> 990 991<ol><li> 992<p>Have started</p> 993</li><li> 994<p>Are registered or bound to a TCP/IP port by the operating system</p> 995</li><li> 996<p>Are actually paying attention</p> 997</li></ol> 998 999<div class="sect3"><a name="samba2-CHP-12-SECT-2.4.1"/> 1000 1001<h3 class="head3">Tracking daemon startup</h3> 1002 1003<p><a name="INDEX-47"/>First, check the Samba logs. If 1004you've started the daemons, the message 1005<tt class="literal">smbd</tt> <tt class="literal">version</tt> 1006<tt class="literal">number</tt> <tt class="literal">started</tt> should appear. 1007If it doesn't, you need to restart the Samba 1008daemons.</p> 1009 1010<p>If the daemon reports that it has indeed started, look out for 1011<tt class="literal">bind</tt> <tt class="literal">failed</tt> 1012<tt class="literal">on</tt> <tt class="literal">port</tt> <tt class="literal">139</tt> 1013<tt class="literal">socket_addr=0</tt> <tt class="literal">(Address</tt> 1014<tt class="literal">already</tt> <tt class="literal">in</tt> 1015<tt class="literal">use)</tt>. This means another daemon has been started 1016on port 139 (<em class="emphasis">smbd</em> ). Also, 1017<em class="emphasis">nmbd</em> will report a similar failure if it cannot 1018bind to port 137. Either you've started them twice, 1019or the <em class="emphasis">inetd</em> server has tried to provide a 1020daemon for you. If it's the latter, 1021we'll diagnose that in a moment.</p> 1022 1023 1024</div> 1025 1026 1027 1028<div class="sect3"><a name="samba2-CHP-12-SECT-2.4.2"/> 1029 1030<h3 class="head3">Looking for daemon processes with ps</h3> 1031 1032<p><a name="INDEX-48"/>Another way to make sure the daemons are 1033running is to check their processes on the system. Use the 1034<em class="emphasis">ps</em><a name="INDEX-49"/> command on the server with the 1035"long" option for your system type 1036(commonly <tt class="literal">ps</tt> <tt class="literal">ax</tt> or 1037<tt class="literal">ps</tt> <tt class="literal">-ef</tt>), and see whether 1038<em class="emphasis">smbd</em> and <em class="emphasis">nmbd</em> are already 1039running. This often looks like the following:</p> 1040 1041<blockquote><pre class="code">$ <tt class="userinput"><b>ps ax</b></tt> 1042 PID TTY STAT TIME COMMAND 1043 1 ? S 0:03 init [2] 1044 2 ? SW 0:00 (kflushd) 1045<i class="lineannotation">(...many lines of processes...) </i> 1046 234 ? S 0:14 nmbd -D3 1047 237 ? S 0:11 smbd -D3 1048<i class="lineannotation">(...more lines, possibly including more smbd lines...)</i></pre></blockquote> 1049 1050<p>This example illustrates that <em class="emphasis">smbd</em> and 1051<em class="emphasis">nmbd</em> have already started as standalone daemons 1052(the <em class="emphasis">-D</em> option) at log level 3.</p> 1053 1054 1055</div> 1056 1057 1058 1059<div class="sect3"><a name="samba2-CHP-12-SECT-2.4.3"/> 1060 1061<h3 class="head3">Looking for daemons bound to ports</h3> 1062 1063<p><a name="INDEX-50"/>Next, the daemons have to be registered 1064with the operating system so that they can get access to TCP/IP 1065ports. The <em class="emphasis">netstat</em> command will tell you if this 1066has been done. Run the command <tt class="literal">netstat</tt> 1067<tt class="literal">-a</tt> on the server, and look for lines mentioning 1068<tt class="literal">netbios</tt>, <tt class="literal">137</tt>, or 1069<tt class="literal">139</tt>:</p> 1070 1071<blockquote><pre class="code">$ <tt class="userinput"><b>netstat -a </b></tt> 1072Active Internet connections (including servers) 1073Proto Recv-Q Send-Q Local Address Foreign Address (state) 1074udp 0 0 *.137 *.* 1075tcp 0 0 *.139 *.* LISTEN 1076tcp 8370 8760 server.139 client.1439 ESTABLISHED</pre></blockquote> 1077 1078<p>Among similar lines, there should be at least one UDP line for 1079<tt class="literal">*.netbios-</tt> or <tt class="literal">*.137</tt>. This 1080indicates that the <em class="emphasis">nmbd</em> server is registered and 1081(we hope) is waiting to answer requests. There should also be at 1082least one TCP line mentioning <tt class="literal">*.netbios-</tt> or 1083<tt class="literal">*.139</tt>, and it will probably be in the LISTEN 1084state. This means that <em class="emphasis">smbd</em> is up and listening 1085for connections.</p> 1086 1087<p>There might be other TCP lines indicating connections from 1088<em class="emphasis">smbd</em> to clients, one for each client. These are 1089usually in the ESTABLISHED state. If there are 1090<em class="emphasis">smbd</em> lines in the ESTABLISHED state, 1091<em class="emphasis">smbd</em> is definitely running. If there is only one 1092line in the LISTEN state, we're not sure yet. If 1093both of the lines are missing, a daemon has not succeeded in 1094starting, so it's time to check the logs and then go 1095back to <a href="ch02.html">Chapter 2</a>.</p> 1096 1097<p>If there is a line for each client, it might be coming either from a 1098Samba daemon or from the master IP daemon, 1099<em class="emphasis">inetd</em>. It's quite possible that 1100your <em class="emphasis">inetd</em> startup file contains lines that 1101start Samba daemons without your realizing it; for instance, the 1102lines might have been placed there if you installed Samba as part of 1103a Linux distribution. The daemons started by 1104<em class="emphasis">inetd</em> prevent ours from running. This problem 1105typically produces log messages such as <tt class="literal">bind</tt> 1106<tt class="literal">failed</tt> <tt class="literal">on</tt> 1107<tt class="literal">port</tt> <tt class="literal">139</tt> 1108<tt class="literal">socket</tt> <tt class="literal">addr=0</tt> 1109<tt class="literal">(Address</tt> <tt class="literal">already</tt> 1110<tt class="literal">in</tt> <tt class="literal">use)</tt>.</p> 1111 1112<p>Check your <em class="filename">/etc/inetd.conf</em> ; unless 1113you're intentionally starting the daemons from 1114there, <tt class="literal">netbios-ns</tt> (UDP port 137) or 1115<tt class="literal">netbios-ssn</tt> (tcp port 139) servers should be 1116mentioned there. If your system is providing an SMB daemon via 1117<em class="emphasis">inetd</em>, lines such as the following will appear 1118in the <em class="filename">inetd.conf</em> file:</p> 1119 1120<blockquote><pre class="code">netbios-ssn stream tcp nowait root /usr/local/samba/bin/smbd smbd 1121netbios-ns dgram udp wait root /usr/local/samba/bin/nmbd nmbd</pre></blockquote> 1122 1123<p>If your system uses <em class="emphasis">xinetd</em> instead of 1124<em class="emphasis">inetd</em>, see <a href="ch02.html">Chapter 2</a> for 1125details concerning its configuration.</p> 1126 1127 1128</div> 1129 1130 1131 1132<div class="sect3"><a name="samba2-CHP-12-SECT-2.4.4"/> 1133 1134<h3 class="head3">Checking smbd with telnet</h3> 1135 1136<p><a name="INDEX-51"/><a name="INDEX-52"/><a name="INDEX-53"/>Ironically, the easiest way to test that 1137the <em class="emphasis">smbd</em> server is actually working is to send 1138it a meaningless message and see if it is rejected. Try something 1139such as the following:</p> 1140 1141<blockquote><pre class="code">$ <tt class="userinput"><b>echo "hello" | telnet localhost 139 </b></tt> 1142Trying 1143Trying 192.168.236.86 ... 1144Connected to localhost. Escape character is '^]'. 1145Connection closed by foreign host.</pre></blockquote> 1146 1147<p>This sends an erroneous but harmless message to 1148<em class="emphasis">smbd</em>. If you get a <tt class="literal">Connected</tt> 1149message followed by a <tt class="literal">Connection</tt> 1150<tt class="literal">closed</tt> message, the test was a success. You have 1151an <em class="emphasis">smbd</em> daemon listening on the port and 1152rejecting improper connection messages. On the other hand, if you get 1153<tt class="literal">telnet</tt>: <tt class="literal">connect</tt>: 1154<tt class="literal">Connection</tt> <tt class="literal">refused</tt>, most likely 1155no daemon is present. Check the logs and go back to <a href="ch02.html">Chapter 2</a>.</p> 1156 1157<p>Regrettably, there isn't an easy test for 1158<em class="emphasis">nmbd</em>. If the <em class="emphasis">telnet</em> test 1159and the <em class="emphasis">netstat</em> test both say that an 1160<em class="emphasis">smbd</em> is running, there is a good chance that 1161<em class="emphasis">netstat</em> will also be correct about 1162<em class="emphasis">nmbd</em> running.</p> 1163 1164 1165</div> 1166 1167 1168 1169<div class="sect3"><a name="samba2-CHP-12-SECT-2.4.5"/> 1170 1171<h3 class="head3">Testing daemons with testparm</h3> 1172 1173<p><a name="INDEX-54"/><a name="INDEX-55"/>Once you know 1174there's a daemon, you should always run 1175<em class="emphasis">testparm</em>, in hopes of getting something such as 1176the following:</p> 1177 1178<blockquote><pre class="code">$ <tt class="userinput"><b>testparm </b></tt> 1179Load smb config files from /opt/samba/lib/smb.conf 1180Processing section "[homes]" 1181Processing section "[printers]" ... 1182Processing section "[tmp]" 1183Loaded services file OK. ...</pre></blockquote> 1184 1185<p>The <em class="emphasis">testparm</em> program normally reports the 1186processing of a series of sections and responds with 1187<tt class="literal">Loaded</tt> <tt class="literal">services</tt> 1188<tt class="literal">file</tt> <tt class="literal">OK</tt> if it succeeds. If not, 1189it reports one or more of the following messages, which also appear 1190in the logs as noted:</p> 1191 1192<dl> 1193<dt><b>Allow/Deny connection from account (n) to service</b></dt> 1194<dd> 1195<p>A <em class="emphasis">testparm</em>-only message produced if you have 1196<tt class="literal">valid</tt> <tt class="literal">user</tt> or 1197<tt class="literal">invalid</tt> <tt class="literal">user</tt> options set in 1198your <em class="emphasis">smb.conf</em>. You will want to make sure that 1199you are on the valid user list, and that <tt class="literal">root</tt>, 1200<tt class="literal">bin</tt>, etc., are on the invalid user list. If you 1201don't, you will not be able to connect, or users who 1202shouldn't <em class="emphasis">will</em> be able to.</p> 1203</dd> 1204 1205 1206 1207<dt><b>Warning: You have some share names that are longer than eight chars</b></dt> 1208<dd> 1209<p>For anyone using Windows for Workgroups and older clients. They fail 1210to connect to shares with long names, producing an overflow message 1211that sounds confusingly like a memory overflow.</p> 1212</dd> 1213 1214 1215 1216<dt><b>Warning: [name] service MUST be printable!</b></dt> 1217<dd> 1218<p>A printer share lacks a <tt class="literal">printable</tt> 1219<tt class="literal">=</tt> <tt class="literal">yes</tt> option.</p> 1220</dd> 1221 1222 1223 1224<dt><b>No path in service name using [name]</b></dt> 1225<dd> 1226<p>A file share doesn't know which directory to provide 1227to the user, or a print share doesn't know which 1228directory to use for spooling. If no path is specified, the service 1229will try to run with a path of <em class="emphasis">/tmp</em>, which might 1230not be what you want.</p> 1231</dd> 1232 1233 1234 1235<dt><b>Note: Servicename is flagged unavailable</b></dt> 1236<dd> 1237<p>Just a reminder that you have used the <tt class="literal">available</tt> 1238<tt class="literal">=</tt> <tt class="literal">no</tt> option in a share.</p> 1239</dd> 1240 1241 1242 1243<dt><b>Can't find include file [name] </b></dt> 1244<dd> 1245<p>A configuration file referred to by an <tt class="literal">include</tt> 1246option did not exist. If you were including the file unconditionally, 1247this is an error and probably a serious one: the share will not have 1248the configuration you intended. If you were including it based on one 1249of the <tt class="literal">%</tt> variables, such as <tt class="literal">%a</tt> 1250(architecture), you will need to decide whether, for example, a 1251missing Windows for Workgroups configuration file is a problem. It 1252often isn't.</p> 1253</dd> 1254 1255 1256 1257<dt><b>Can't copy service name, unable to copy to itself</b></dt> 1258<dd> 1259<p>You tried to copy an <em class="filename">smb.conf</em> section into 1260itself.</p> 1261</dd> 1262 1263 1264 1265<dt><b>Unable to copy service—source not found: [name]</b></dt> 1266<dd> 1267<p>Indicates a missing or misspelled section in a 1268<tt class="literal">copy</tt> <tt class="literal">=</tt> option.</p> 1269</dd> 1270 1271 1272 1273<dt><b>Ignoring unknown parameter name </b></dt> 1274<dd> 1275<p>Typically indicates an obsolete, misspelled, or unsupported option.</p> 1276</dd> 1277 1278 1279 1280<dt><b>Global parameter name found in service section </b></dt> 1281<dd> 1282<p>Indicates that a global-only parameter has been used in an individual 1283share. Samba ignores the parameter.</p> 1284</dd> 1285 1286</dl> 1287 1288<p>After the <em class="emphasis">testparm</em> test, repeat it with 1289(exactly) three parameters: the name of your 1290<em class="filename">smb.conf</em> file, the name of your client, and its 1291IP address:</p> 1292 1293<blockquote><pre class="code"># <tt class="userinput"><b>testparm /usr/local/samba/lib/smb.conf client 192.168.236.10</b></tt></pre></blockquote> 1294 1295<p>This will run one more test that checks the hostname and address 1296against <tt class="literal">hosts</tt> <tt class="literal">allow</tt> and 1297<tt class="literal">hosts</tt> <tt class="literal">deny</tt> options and might 1298produce the <tt class="literal">Allow</tt> <tt class="literal">connection</tt> 1299<tt class="literal">from</tt> <tt class="literal">hostname</tt> 1300<tt class="literal">to</tt> <tt class="literal">service</tt> and/or 1301<tt class="literal">Deny</tt> <tt class="literal">connection</tt> 1302<tt class="literal">from</tt> <tt class="literal">hostname</tt> 1303<tt class="literal">to</tt> <tt class="literal">service</tt> messages for the 1304client system. These messages indicate that you have 1305<tt class="literal">hosts</tt> <tt class="literal">allow</tt> and/or 1306<tt class="literal">hosts</tt> <tt class="literal">deny</tt> options in your 1307<em class="filename">smb.conf</em>, and they prohibit access from the 1308client system. <a name="INDEX-56"/></p> 1309 1310 1311</div> 1312 1313 1314</div> 1315 1316 1317<div class="sect2"><a name="samba2-CHP-12-SECT-2.5"/> 1318 1319<h3 class="head2">Troubleshooting SMB Connections</h3> 1320 1321<p><a name="INDEX-57"/><a name="INDEX-58"/>Now 1322that you know the servers are up, you need to make sure 1323they're running properly. We start by placing a 1324simple <em class="filename">smb.conf</em> file in the 1325<em class="filename">/usr/local/samba/lib</em> directory.</p> 1326 1327 1328<div class="sect3"><a name="samba2-CHP-12-SECT-2.5.1"/> 1329 1330<h3 class="head3">A minimal smb.conf file</h3> 1331 1332<p>In the following tests, we assume you have a 1333<tt class="literal">[temp]</tt> share suitable for testing, plus at least 1334one account. An <em class="filename">smb.conf</em> file that includes just 1335these is as follows:</p> 1336 1337<blockquote><pre class="code">[global] 1338 workgroup = <em class="replaceable">EXAMPLE</em> 1339 security = user 1340 browsable = yes 1341 local master = yes 1342[homes] 1343 guest ok = no 1344 browsable = no 1345[temp] 1346 path = /tmp 1347 public = yes</pre></blockquote> 1348<a name="samba2-CHP-12-NOTE-156"/><blockquote class="note"><h4 class="objtitle">WARNING</h4> 1349<p>The <tt class="literal">public</tt> <tt class="literal">=</tt> 1350<tt class="literal">yes</tt> option in the <tt class="literal">[temp]</tt> share 1351is just for testing. You probably don't want people 1352without accounts storing things on your Samba server, so you should 1353comment it out when you're done.</p> 1354</blockquote> 1355 1356 1357</div> 1358 1359 1360 1361<div class="sect3"><a name="samba2-CHP-12-SECT-2.5.2"/> 1362 1363<h3 class="head3">Testing locally with smbclient</h3> 1364 1365<p><a name="INDEX-59"/><a name="INDEX-60"/>The first test is to ensure that the 1366server can list its own services (shares). Run the command 1367<tt class="literal">smbclient</tt> <em class="emphasis">-L</em> 1368<tt class="literal">localhost</tt> <tt class="literal">-U%</tt> to connect to the 1369server from itself, and specify the guest user. You should see the 1370following:</p> 1371 1372<blockquote><pre class="code">$ <tt class="userinput"><b>smbclient -L localhost -U% </b></tt> 1373Server time is Wed May 27 17:57:40 2002 Timezone is UTC-4.0 1374Server=[localhost] 1375User=[davecb] 1376Workgroup=[EXAMPLE] 1377Domain=[EXAMPLE] 1378 Sharename Type Comment 1379 --------- ----- ---------- 1380 temp Disk 1381 IPC$ IPC IPC Service (Samba 1.9.18) 1382 homes Disk Home directories 1383This machine does not have a browse list</pre></blockquote> 1384 1385<p>If you received this output, move on to the next section, <a href="ch12.html#samba2-CHP-12-SECT-2.5.3">Section 12.2.5.3</a>. On the other hand, if you 1386receive an error, check the following:</p> 1387 1388<ul><li> 1389<p>If you get <tt class="literal">Get_hostbyname</tt>: 1390<tt class="literal">unknown</tt> <tt class="literal">host</tt> 1391<tt class="literal">localhost</tt>, either you've spelled 1392its name wrong or there actually is a problem (which should have been 1393seen back in <a href="ch12.html#samba2-CHP-12-SECT-2.2.2">Section 12.2.2.2</a>). In the 1394latter case, move on to <a href="ch12.html#samba2-CHP-12-SECT-2.7">Section 12.2.7</a>, later in this chapter.</p> 1395</li><li> 1396<p>If you get <tt class="literal">Connect</tt> <tt class="literal">error</tt>: 1397<tt class="literal">Connection</tt> <tt class="literal">refused</tt>, the server 1398was found, but it wasn't running an 1399<em class="emphasis">nmbd</em> daemon. Skip back to 1400<a href="ch12.html#samba2-CHP-12-SECT-2.4">Section 12.2.4</a>, 1401earlier in this chapter, and retest the daemons.</p> 1402</li><li> 1403<p>If you get the message <tt class="literal">Your</tt> 1404<tt class="literal">server</tt> <tt class="literal">software</tt> 1405<tt class="literal">is</tt> <tt class="literal">being</tt> 1406<tt class="literal">unfriendly</tt>, the initial session request packet got 1407a garbage response from the server. The server might have crashed or 1408started improperly. The common causes of this can be discovered by 1409scanning the logs for the following:</p> 1410<ul><li> 1411<p>Invalid command-line parameters to <em class="emphasis">smbd</em> ; see 1412the <em class="emphasis">smbd</em> manual page.</p> 1413</li><li> 1414<p>A fatal problem with the <em class="filename">smb.conf</em> file that 1415prevents the startup of <em class="emphasis">smbd</em>. Always check your 1416changes with <em class="emphasis">testparm</em>, as was done in <a href="ch12.html#samba2-CHP-12-SECT-2.4.5">Section 12.2.4.5</a>, earlier in this chapter.</p> 1417</li><li> 1418<p>Missing directories where Samba is supposed to keep its log and lock 1419files.</p> 1420</li><li> 1421<p>The presence of a server already on the port (139 for 1422<em class="emphasis">smbd</em>, 137 for <em class="emphasis">nmbd</em> ), 1423preventing the daemon from starting.</p> 1424</li></ul> 1425</li> 1426<li> 1427<p>If you're using <em class="emphasis">inetd</em> (or 1428xinetd ) instead of standalone daemons, be sure to check your 1429<em class="filename">/etc/inetd.conf</em> (or xinetd configuration files) 1430and <em class="filename">/etc/services</em> entries against their manual 1431pages for errors as well.</p> 1432</li><li> 1433<p>If you get a <tt class="literal">Password</tt>: prompt, your guest account 1434is not set up properly. The <em class="emphasis">-U%</em> option tells 1435<em class="emphasis">smbclient</em> to do a "null 1436login," which requires that the guest account be 1437present but does not require it to have any privileges.</p> 1438</li><li> 1439<p>If you get the message <tt class="literal">SMBtconX</tt> 1440<tt class="literal">failed</tt>. <tt class="literal">ERRSRV--ERRaccess</tt>, you 1441aren't permitted access to the server. This normally 1442means you have a <tt class="literal">hosts</tt> <tt class="literal">allow</tt> 1443option that doesn't include the server or a 1444<tt class="literal">hosts</tt> <tt class="literal">deny</tt> option that does. 1445Recheck with the command <tt class="literal">testparm</tt> 1446<tt class="literal">smb.conf</tt> <em class="replaceable">your_hostname</em> 1447<em class="replaceable">your_ip_address</em> (see 1448<a href="ch12.html#samba2-CHP-12-SECT-2.4.5">Section 12.2.4.5</a>), 1449and correct any unintended prohibitions.</p> 1450</li></ul> 1451 1452</div> 1453 1454 1455 1456<div class="sect3"><a name="samba2-CHP-12-SECT-2.5.3"/> 1457 1458<h3 class="head3">Testing connections with smbclient</h3> 1459 1460<p><a name="INDEX-61"/><a name="INDEX-62"/>Run the command 1461<tt class="literal">smbclient</tt> 1462<tt class="literal">\\</tt><em class="replaceable">server</em><tt class="literal">\temp</tt> 1463to connect to the server's <tt class="literal">[temp]</tt> 1464share and to see if you can connect to a file service. You should get 1465the following response:</p> 1466 1467<blockquote><pre class="code">$ <tt class="userinput"><b>smbclient '\\server\temp' </b></tt> 1468Server time is Tue May 5 09:49:32 2002 Timezone is UTC-4.0 Password: 1469<b class="emphasis-bold">smb: \> quit</b></pre></blockquote> 1470<p>You might receive the following errors:</p> 1471 1472<ul><li> 1473<p>If you get <tt class="literal">Get_Hostbyname</tt>: 1474<tt class="literal">Unknown</tt> <tt class="literal">host</tt> 1475<tt class="literal">name</tt>, <tt class="literal">Connect</tt> 1476<tt class="literal">error</tt>: <tt class="literal">Connection</tt> 1477<tt class="literal">refused</tt>, or <tt class="literal">Your</tt> 1478<tt class="literal">server</tt> <tt class="literal">software</tt> 1479<tt class="literal">is</tt> <tt class="literal">being</tt> 1480<tt class="literal">unfriendly</tt>, see the previous section, 1481<a href="ch12.html#samba2-CHP-12-SECT-2.5.2">Section 12.2.5.2</a>, for 1482the diagnoses.</p> 1483</li><li> 1484<p>If you get the message <tt class="literal">servertemp</tt>: 1485<tt class="literal">Not</tt> <tt class="literal">enough</tt> 1486<tt class="literal">`\</tt>' 1487<tt class="literal">characters</tt> <tt class="literal">in</tt> 1488<tt class="literal">service</tt>, you likely didn't quote 1489the address, so Unix stripped off backslashes. You can also write the 1490command:</p> 1491 1492<blockquote><pre class="code">smbclient \\\\<em class="replaceable">server</em>\\temp</pre></blockquote> 1493 1494<p>or:</p> 1495<blockquote><pre class="code">smbclient //<em class="replaceable">server</em>/temp</pre></blockquote> 1496</li> 1497</ul> 1498<p>Now, provide your Unix account password to the 1499<tt class="literal">Password</tt>: prompt. If you then get an 1500<tt class="literal">smb</tt>: <tt class="literal">\></tt> prompt, it worked. 1501Enter <tt class="literal">quit</tt> and continue on to the next section, 1502<a href="ch12.html#samba2-CHP-12-SECT-2.5.4">Section 12.2.5.4</a>. If 1503you got <tt class="literal">SMBtconX</tt> <tt class="literal">failed</tt>. 1504<tt class="literal">ERRSRV--ERRinvnetname</tt>, the problem can be any of 1505the following:</p> 1506 1507<ul><li> 1508<p>A wrong share name: you might have spelled it wrong, it might be too 1509long, it might be in mixed case, or it might not be available. Check 1510that it's what you expect with 1511<em class="emphasis">testparm</em> (see the earlier section, <a href="ch12.html#samba2-CHP-12-SECT-2.4.5">Section 12.2.4.5</a>).</p> 1512</li><li> 1513<p>A <tt class="literal">security</tt> <tt class="literal">=</tt> 1514<tt class="literal">share</tt> parameter in your Samba configuration file, 1515in which case you might have to add <tt class="literal">-U</tt> 1516<em class="replaceable">your_account</em> to the 1517<em class="emphasis">smbclient</em> command.</p> 1518</li><li> 1519<p>An erroneous username.</p> 1520</li><li> 1521<p>An erroneous password.</p> 1522</li><li> 1523<p>An <tt class="literal">invalid</tt> <tt class="literal">users</tt> or 1524<tt class="literal">valid</tt> <tt class="literal">users</tt> option in your 1525<em class="emphasis">smb.conf</em> file that doesn't 1526allow your account to connect. Recheck using 1527<tt class="literal">testparm</tt> <tt class="literal">smb.conf</tt> 1528<em class="replaceable">your_hostname your_ip_address</em> (see the 1529earlier section, <a href="ch12.html#samba2-CHP-12-SECT-2.4.5">Section 12.2.4.5</a>).</p> 1530</li><li> 1531<p>A <tt class="literal">valid</tt> <tt class="literal">hosts</tt> option that 1532doesn't include the server, or an 1533<tt class="literal">invalid</tt> <tt class="literal">hosts</tt> option that does. 1534Also test this with <em class="emphasis">testparm</em>.</p> 1535</li><li> 1536<p>A problem in authentication, such as if shadow passwords or the 1537Password Authentication Module (PAM) is used on the server, but Samba 1538is not compiled to use it. This is rare, but it occasionally happens 1539when a SunOS 4 Samba binary (with no shadow passwords) is run without 1540recompilation on a Solaris system (with shadow passwords).</p> 1541</li><li> 1542<p>The <tt class="literal">encrypted</tt> <tt class="literal">passwords</tt> 1543<tt class="literal">=</tt> <tt class="literal">yes</tt> option is in the 1544configuration file, but no password for your account is in the 1545<em class="emphasis">smbpasswd</em> file.</p> 1546</li><li> 1547<p>You have a null password entry, either in Unix 1548<em class="filename">/etc/passwd</em> or in the 1549<em class="emphasis">smbpasswd</em> file.</p> 1550</li><li> 1551<p>You are connecting to <tt class="literal">[temp]</tt>, and you do not have 1552the <tt class="literal">guest</tt> <tt class="literal">ok</tt> 1553<tt class="literal">=</tt> <tt class="literal">yes</tt> option in the 1554<tt class="literal">[temp]</tt> section of the 1555<em class="emphasis">smb.conf</em> file.</p> 1556</li><li> 1557<p>You are connecting to <tt class="literal">[temp]</tt> before connecting to 1558your home directory, and your guest account isn't 1559set up correctly. If you can connect to your home directory and then 1560connect to <tt class="literal">[temp]</tt>, that's the 1561problem. See <a href="ch02.html">Chapter 2</a> for more information on 1562creating a basic Samba configuration file.</p> 1563 1564<p>A bad guest account will also prevent you from printing or browsing 1565until after you've logged in to your home directory.</p> 1566</li></ul> 1567<p>There is one more reason for this failure that has nothing at all to 1568do with passwords: the <tt class="literal">path</tt> parameter in your 1569<em class="filename">smb.conf</em> file might point somewhere that 1570doesn't exist. This will not be diagnosed by 1571<em class="emphasis">testparm</em>, and most SMB clients 1572can't distinguish it from other types of bad user 1573accounts. You will have to check it manually.</p> 1574 1575<p>Once you have connected to <tt class="literal">[temp]</tt> successfully, 1576repeat the test, this time logging in to your home directory (e.g., 1577map network drive 1578<em class="replaceable">server</em><tt class="literal">\davecb</tt>). If you 1579have to change anything to get that to work, retest 1580<tt class="literal">[temp]</tt> again afterward.</p> 1581 1582 1583</div> 1584 1585 1586 1587<div class="sect3"><a name="samba2-CHP-12-SECT-2.5.4"/> 1588 1589<h3 class="head3">Testing connections with net use</h3> 1590 1591<p><a name="INDEX-63"/><a name="INDEX-64"/>Run the command 1592<tt class="literal">net</tt> <tt class="literal">use</tt> <tt class="literal">*</tt> 1593<tt class="literal">\</tt><em class="replaceable">server</em><tt class="literal">\temp</tt> 1594on the Windows client to see if it can connect to the server. You 1595should be prompted for a password, then receive the response 1596<tt class="literal">The</tt> <tt class="literal">command</tt> 1597<tt class="literal">was</tt> <tt class="literal">completed</tt> 1598<tt class="literal">successfully</tt>.</p> 1599 1600<p>If that worked, continue with the steps in the next section, <a href="ch12.html#samba2-CHP-12-SECT-2.5.5">Section 12.2.5.5</a>. Otherwise:</p> 1601 1602<ul><li> 1603<p>If you get <tt class="literal">The</tt> <tt class="literal">specified</tt> 1604<tt class="literal">shared</tt> <tt class="literal">directory</tt> 1605<tt class="literal">cannot</tt> <tt class="literal">be</tt> 1606<tt class="literal">found</tt>, or <tt class="literal">Cannot</tt> 1607<tt class="literal">locate</tt> <tt class="literal">specified</tt> 1608<tt class="literal">share</tt> <tt class="literal">name</tt>, the directory name 1609is either misspelled or not in the <em class="emphasis">smb.conf</em> 1610file. This message can also warn of a name that is in mixed case, 1611including spaces, or that is longer than eight characters.</p> 1612</li><li> 1613<p>If you get <tt class="literal">The</tt> <tt class="literal">computer</tt> 1614<tt class="literal">name</tt> <tt class="literal">specified</tt> 1615<tt class="literal">in</tt> <tt class="literal">the</tt> 1616<tt class="literal">network</tt> <tt class="literal">path</tt> 1617<tt class="literal">cannot</tt> <tt class="literal">be</tt> 1618<tt class="literal">located</tt> or <tt class="literal">Cannot</tt> 1619<tt class="literal">locate</tt> <tt class="literal">specified</tt> 1620<tt class="literal">computer</tt>, the directory name has been misspelled, 1621the name service has failed, there is a networking problem, or the 1622<tt class="literal">hosts</tt> <tt class="literal">deny</tt> option includes your 1623host.</p> 1624<ul><li> 1625<p>If it is not a spelling mistake, you need to double back at least to 1626<a href="ch12.html#samba2-CHP-12-SECT-2.5.3">Section 12.2.5.3</a> to 1627investigate why it doesn't connect.</p> 1628</li><li> 1629<p>If <em class="emphasis">smbclient</em> does work, there is a name service 1630problem with the client name service, and you need to go forward to 1631<a href="ch12.html#samba2-CHP-12-SECT-2.6.2">Section 12.2.6.2</a> and see if 1632you can look up both the client and server with 1633<em class="emphasis">nmblookup</em>.</p> 1634</li> 1635</ul> 1636</li> 1637 1638<li> 1639<p>If you get <tt class="literal">The</tt> <tt class="literal">password</tt> 1640<tt class="literal">is</tt> <tt class="literal">invalid</tt> 1641<tt class="literal">for</tt> <tt class="literal">\server\username</tt>, your 1642locally cached copy on the client doesn't match the 1643one on the server. You will be prompted for a replacement.</p> 1644 1645<a name="samba2-CHP-12-NOTE-157"/><blockquote class="note"><h4 class="objtitle">TIP</h4> 1646<p>Each Windows 95/98/Me client keeps a local 1647<em class="emphasis">password</em> file, but it's really 1648just a cached copy of the password it sends to Samba and NT/2000/XP 1649servers to authenticate you. That's what is being 1650prompted for here. You can still log on to a Windows system without a 1651password (but not to NT/2000/XP).</p> 1652</blockquote> 1653 1654<p>If you provide your password and it still fails, your password is not 1655being matched on the server, you have a <tt class="literal">valid</tt> 1656<tt class="literal">users</tt> or <tt class="literal">invalid</tt> 1657<tt class="literal">users</tt> list denying you permission, NetBEUI is 1658interfering, or the encrypted password problem described in the next 1659paragraph exists.</p> 1660</li><li> 1661<p>If your client is Windows NT 4.0, NT 3.5 with Patch 3, Windows 95 1662with Patch 3, Windows 98, any of these with Internet Explorer 4.0, or 1663any subsequent version of Windows, the system will default to 1664Microsoft encryption for passwords. In general, if you have installed 1665a major Microsoft product on any of the older Windows versions, you 1666might have applied an update and turned on encrypted passwords. If 1667the client is defaulting to encrypted passwords, you will need to 1668specify <tt class="literal">encrypt</tt> <tt class="literal">passwords</tt> 1669<tt class="literal">=</tt> <tt class="literal">yes</tt> in your Samba 1670configuration file if you are using a version of Samba prior to Samba 16713.0.</p> 1672 1673<a name="samba2-CHP-12-NOTE-158"/><blockquote class="note"><h4 class="objtitle">TIP</h4> 1674<p>Because of Internet Explorer's willingness to honor 1675URLs such as <em class="filename">file://somehost/somefile</em> by making 1676SMB connections, clients up to and including Windows 95 Patch Level 2 1677would happily send your password, in plain text, to SMB servers 1678anywhere on the Internet. This was considered a bad idea, and 1679Microsoft switched to using only encrypted passwords in the SMB 1680protocol. All subsequent releases of Microsoft's 1681products have included this correction.</p> 1682</blockquote> 1683</li> 1684 1685<li> 1686<p>If you have a mixed-case password on Unix, the client is probably 1687sending it in all one case. If changing your password to all one case 1688works, this was the problem. Regrettably, all but the oldest clients 1689support uppercase passwords, so Samba will try once with the password 1690in uppercase and once in lowercase. If you wish to use mixed-case 1691passwords, see the <tt class="literal">password</tt> 1692<tt class="literal">level</tt> option in <a href="ch09.html">Chapter 9</a> for a 1693workaround.</p> 1694</li><li> 1695<p>You might have a <tt class="literal">valid</tt> <tt class="literal">users</tt> 1696problem, as tested with <em class="emphasis">smbclient</em> (see the 1697earlier section, <a href="ch12.html#samba2-CHP-12-SECT-2.5.3">Section 12.2.5.3</a>).</p> 1698</li><li> 1699<p>You might have the NetBEUI protocol bound to the Microsoft client. 1700This often produces long timeouts and erratic failures and is known 1701to have caused failures to accept passwords in the past. Unless you 1702absolutely need the NetBEUI protocol, remove it.</p> 1703</li></ul> 1704<a name="samba2-CHP-12-NOTE-159"/><blockquote class="note"><h4 class="objtitle">TIP</h4> 1705<p>The term "bind" is used here to 1706mean connecting one piece of software to another. When configured 1707correctly, the Microsoft SMB client is "bound 1708to" TCP/IP in the bindings section of the TCP/IP 1709properties panel under the Windows 95/98/Me Network icon in the 1710Control Panel. TCP/IP in turn is bound to an Ethernet card. This is 1711not the same sense of the word as binding an SMB daemon to a TCP/IP 1712port.</p> 1713</blockquote> 1714 1715 1716</div> 1717 1718 1719 1720<div class="sect3"><a name="samba2-CHP-12-SECT-2.5.5"/> 1721 1722<h3 class="head3">Testing connections with Windows Explorer</h3> 1723 1724<p><a name="INDEX-65"/><a name="INDEX-66"/>Start Windows Explorer 1725(not Internet Explorer), select Map Network Drive from the Tools 1726menu, and specify the UNC for one of your shares on the Samba server 1727to see if you can make Explorer connect to it. If so, 1728you've succeeded and can skip to the next section, 1729<a href="ch12.html#samba2-CHP-12-SECT-2.6">Section 12.2.6</a>.</p> 1730 1731<p>Windows Explorer is a rather poor diagnostic tool: it tells you that 1732something's wrong, but rarely what it is. If you get 1733a failure, you'll need to track it down with the 1734Windows <em class="emphasis">net use</em> command, which has far superior 1735error reporting:</p> 1736 1737<ul><li> 1738<p>If you get <tt class="literal">The</tt> <tt class="literal">password</tt> 1739<tt class="literal">for</tt> <tt class="literal">this</tt> 1740<tt class="literal">connection</tt> <tt class="literal">that</tt> 1741<tt class="literal">is</tt> <tt class="literal">in</tt> <tt class="literal">your</tt> 1742<tt class="literal">password</tt> <tt class="literal">file</tt> 1743<tt class="literal">is</tt> <tt class="literal">no</tt> <tt class="literal">longer</tt> 1744<tt class="literal">correct</tt>, you might have any of the following:</p> 1745<ul><li> 1746<p>Your locally cached copy on the client doesn't match 1747the one on the server.</p> 1748</li><li> 1749<p>You didn't provide a username and password when 1750logging on to the client. Some versions of Explorer will continue to 1751send a null username and password, even if you provide a password.</p> 1752</li><li> 1753<p>You have misspelled the password.</p> 1754</li><li> 1755<p>You have an <tt class="literal">invalid</tt> <tt class="literal">users</tt> or 1756<tt class="literal">valid</tt> <tt class="literal">users</tt> list denying 1757permission.</p> 1758</li><li> 1759<p>Your client is defaulting to encrypted passwords, but Samba is 1760configured with the <tt class="literal">encrypt</tt> 1761<tt class="literal">passwords</tt> <tt class="literal">=</tt> 1762<tt class="literal">no</tt> configuration file parameter.</p> 1763</li><li> 1764<p>You have a mixed-case password, which the client is supplying in all 1765one case.</p> 1766</li> 1767</ul> 1768</li> 1769<li> 1770<p>If you get <tt class="literal">The</tt> <tt class="literal">network</tt> 1771<tt class="literal">name</tt> <tt class="literal">is</tt> 1772<tt class="literal">either</tt> <tt class="literal">incorrect</tt>, 1773<tt class="literal">or</tt> <tt class="literal">a</tt> <tt class="literal">network</tt> 1774<tt class="literal">to</tt> <tt class="literal">which</tt> <tt class="literal">you</tt> 1775<tt class="literal">do</tt> <tt class="literal">not</tt> <tt class="literal">have</tt> 1776<tt class="literal">full</tt> <tt class="literal">access</tt>, or 1777<tt class="literal">Cannot</tt> <tt class="literal">locate</tt> 1778<tt class="literal">specified</tt> <tt class="literal">computer</tt>, you might 1779have any of the following:</p> 1780<ul><li> 1781<p>Misspelled name</p> 1782</li><li> 1783<p>Malfunctioning service</p> 1784</li><li> 1785<p>Failed share</p> 1786</li><li> 1787<p>Networking problem</p> 1788</li><li> 1789<p>Bad <tt class="literal">path</tt> parameter in 1790<em class="filename">smb.conf</em></p> 1791</li><li> 1792<p><tt class="literal">hosts</tt> <tt class="literal">deny</tt> line that excludes 1793you</p> 1794</li> 1795</ul> 1796</li> 1797<li> 1798<p>If you get <tt class="literal">You</tt> <tt class="literal">must</tt> 1799<tt class="literal">supply</tt> <tt class="literal">a</tt> 1800<tt class="literal">password</tt> <tt class="literal">to</tt> 1801<tt class="literal">make</tt> <tt class="literal">this</tt> 1802<tt class="literal">connection</tt>, the password on the client is out of 1803synchronization with the server, or this is the first time 1804you've tried from this client system and the client 1805hasn't cached it locally yet.</p> 1806</li><li> 1807<p>If you get <tt class="literal">Cannot</tt> <tt class="literal">locate</tt> 1808<tt class="literal">specified</tt> <tt class="literal">share</tt> 1809<tt class="literal">name</tt>, you have a wrong share name or a syntax 1810error in specifying it, a share name longer than eight characters, or 1811one containing spaces or in mixed case.</p> 1812</li></ul> 1813<p>Once you can reliably connect to the share, try again, this time 1814using your home directory. If you have to change something to get 1815home directories working, retest with the first share, and vice 1816versa, as we showed in the earlier section, "Testing 1817connections with net use." As always, if Explorer 1818fails, drop back to that section and debug the connection there. 1819<a name="INDEX-67"/><a name="INDEX-68"/></p> 1820 1821 1822</div> 1823 1824 1825</div> 1826 1827 1828<div class="sect2"><a name="samba2-CHP-12-SECT-2.6"/> 1829 1830<h3 class="head2">Troubleshooting Browsing</h3> 1831 1832<p><a name="INDEX-69"/><a name="INDEX-70"/>Finally, we 1833come to browsing. We've left this for last, not 1834because it is the most difficult, but because it's 1835both optional and partially dependent on a protocol that 1836doesn't guarantee delivery of a packet. Browsing is 1837hard to diagnose if you don't already know that all 1838the other services are running.</p> 1839 1840<p>Browsing is purely optional: it's just a way to find 1841the servers on your network and the shares that they provide. Unix 1842has nothing of the sort and happily does without. Browsing also 1843assumes all your systems are on a local area network (LAN) where 1844broadcasts are allowable.</p> 1845 1846<p>First, the browsing mechanism identifies a system using the 1847unreliable UDP protocol; it then makes a normal (reliable) TCP/IP 1848connection to list the shares the system provides.</p> 1849 1850 1851<div class="sect3"><a name="samba2-CHP-12-SECT-2.6.1"/> 1852 1853<h3 class="head3">Testing browsing with smbclient</h3> 1854 1855<p><a name="INDEX-71"/><a name="INDEX-72"/>We'll start with 1856testing the reliable connection first. From the server, try listing 1857its own shares using <em class="emphasis">smbclient</em> with a 1858<tt class="literal">-L</tt> option and your server's name. 1859You should get something resembling the following:</p> 1860 1861<blockquote><pre class="code">$ <tt class="userinput"><b>smbclient -L server</b></tt> 1862Added interface ip=192.168.236.86 bcast=192.168.236.255 nmask=255.255.255.0 Server 1863time is Tue Apr 28 09:57:28 2002 Timezone is UTC-4.0 1864Password: 1865Domain=[EXAMPLE] OS=[Unix] Server=[Samba 2.2.5] 1866 1867 Sharename Type Comment 1868 --------- ---- ------- 1869 cdrom Disk CD-ROM 1870 cl Printer Color Printer 1 1871 davecb Disk Home Directories 1872 1873 Server Comment 1874 --------- ------- 1875 SERVER Samba 2.2.5 1876 1877 Workgroup Master 1878 --------- ------- 1879 EXAMPLE SERVER</pre></blockquote> 1880 1881<ul><li> 1882<p>If you didn't get a Sharename list, the server is 1883not allowing you to browse any shares. This should not be the case if 1884you've tested any of the shares with Windows 1885Explorer or the <em class="emphasis">net use</em> command. If you 1886haven't done the <tt class="literal">smbclient</tt> 1887<tt class="literal">-L</tt> <tt class="literal">localhost</tt> 1888<tt class="literal">-U%</tt> test yet (see the earlier section, <a href="ch12.html#samba2-CHP-12-SECT-2.5.2">Section 12.2.5.2</a>), do it now. An erroneous 1889guest account can prevent the shares from being seen. Also, check the 1890<em class="filename">smb.conf</em> file to make sure you do not have the 1891option <tt class="literal">browsable</tt> <tt class="literal">=</tt> 1892<tt class="literal">no</tt> anywhere in it: we suggest using a minimal 1893<em class="filename">smb.conf</em> file (see the earlier section, <a href="ch12.html#samba2-CHP-12-SECT-2.5.1">Section 12.2.5.1</a>). You need to have 1894<tt class="literal">browsable</tt> enabled (which is the default) to see 1895the share.</p> 1896</li><li> 1897<p>If you didn't get a browse list, the server is not 1898providing information about the systems on the network. At least one 1899system on the net must support browse lists. Make sure you have 1900<tt class="literal">local</tt> <tt class="literal">master</tt> 1901<tt class="literal">=</tt> <tt class="literal">yes</tt> in the 1902<em class="filename">smb.conf</em> file if you want Samba to be the local 1903master browser.</p> 1904</li><li> 1905<p>If you got a browse list but didn't get 1906<em class="emphasis">/tmp</em>, you probably have a 1907<em class="filename">smb.conf</em> problem. Go back to <a href="ch12.html#samba2-CHP-12-SECT-2.4.5">Section 12.2.4.5</a>.</p> 1908</li><li> 1909<p>If you didn't get a workgroup list with your 1910workgroup name in it, it is possible that your workgroup is set 1911incorrectly in the <em class="filename">smb.conf</em> file.</p> 1912</li><li> 1913<p>If you didn't get a workgroup list at all, ensure 1914that <tt class="literal">workgroup</tt> <tt class="literal">=</tt> 1915<tt class="literal">EXAMPLE</tt> is present in the 1916<em class="filename">smb.conf</em> file.</p> 1917</li><li> 1918<p>If you get nothing, try once more with the options 1919<tt class="literal">-I</tt> <em class="emphasis">ip_address</em> 1920<tt class="literal">-n</tt> <em class="emphasis">netbios_name</em> 1921<tt class="literal">-W</tt> <em class="emphasis">workgroup</em> 1922<tt class="literal">-d3</tt> with the NetBIOS and workgroup name in 1923uppercase. (The <tt class="literal">-d3</tt> option sets the log /debugging 1924level to 3.) Then check the Samba logs for clues.</p> 1925</li></ul> 1926<p>If you're still getting nothing, you 1927shouldn't have gotten this far; double back to at 1928least <a href="ch12.html#samba2-CHP-12-SECT-2.3.1">Section 12.2.3.1</a>, or perhaps 1929<a href="ch12.html#samba2-CHP-12-SECT-2.2.4">Section 12.2.2.4</a>. On the other hand:</p> 1930 1931<ul><li> 1932<p>If you get <tt class="literal">SMBtconX</tt> <tt class="literal">failed</tt>. 1933<tt class="literal">ERRSRV--ERRaccess</tt>, you aren't 1934permitted access to the server. This normally means you have a 1935<tt class="literal">hosts</tt> <tt class="literal">allow</tt> option that 1936doesn't include the server or a 1937<tt class="literal">hosts</tt> <tt class="literal">deny</tt> option that does.</p> 1938</li><li> 1939<p>If you get <tt class="literal">Bad</tt> <tt class="literal">password</tt>, you 1940presumably have one of the following:</p> 1941<ul><li> 1942<p>An incorrect <tt class="literal">hosts</tt> <tt class="literal">allow</tt> or 1943<tt class="literal">hosts</tt> <tt class="literal">deny</tt> line</p> 1944</li><li> 1945<p>An incorrect <tt class="literal">invalid</tt> <tt class="literal">users</tt> or 1946<tt class="literal">valid</tt> <tt class="literal">users</tt> line</p> 1947</li><li> 1948<p>A lowercase password and OS/2 or Windows for Workgroups clients</p> 1949</li><li> 1950<p>A missing or invalid guest account</p> 1951</li></ul> 1952<p>Check what your guest account is (see the earlier section, <a href="ch12.html#samba2-CHP-12-SECT-2.5.2">Section 12.2.5.2</a>), change or comment out any 1953<tt class="literal">hosts</tt> <tt class="literal">allow</tt>, 1954<tt class="literal">hosts</tt> <tt class="literal">deny</tt>, 1955<tt class="literal">valid</tt> <tt class="literal">users</tt>, or 1956<tt class="literal">invalid</tt> <tt class="literal">users</tt> lines, and verify 1957your <em class="filename">smb.conf</em> file with 1958<tt class="literal">testparm</tt> <tt class="literal">smb.conf</tt> 1959<em class="replaceable">your_hostname your_ip_address</em> (see the 1960earlier section, <a href="ch12.html#samba2-CHP-12-SECT-2.4.5">Section 12.2.4.5</a>).</p> 1961</li><li> 1962<p>If you get <tt class="literal">Connection</tt> <tt class="literal">refused</tt>, 1963the <em class="emphasis">smbd</em> server is not running or has crashed. 1964Check that it's up, running, and listening to the 1965network with <em class="emphasis">netstat</em>. See the earlier section, 1966<a href="ch12.html#samba2-CHP-12-SECT-2.4">Section 12.2.4</a>.</p> 1967</li><li> 1968<p>If you get <tt class="literal">Get_Hostbyname</tt>: 1969<tt class="literal">Unknown</tt> <tt class="literal">host</tt> 1970<tt class="literal">name</tt>, you've made a spelling 1971error, there is a mismatch between the Unix and NetBIOS hostname, or 1972there is a name service problem. Start name service debugging as 1973discussed in the earlier section, <a href="ch12.html#samba2-CHP-12-SECT-2.5.4">Section 12.2.5.4</a>. If this works, suspect a 1974name mismatch, and go to the later section, <a href="ch12.html#samba2-CHP-12-SECT-2.9">Section 12.2.9</a>.</p> 1975</li><li> 1976<p>If you get <tt class="literal">Session</tt> <tt class="literal">request</tt> 1977<tt class="literal">failed</tt>, the server refused the connection. This 1978usually indicates an internal error, such as insufficient memory to 1979fork a process.</p> 1980</li><li> 1981<p>If you get <tt class="literal">Your</tt> <tt class="literal">server</tt> 1982<tt class="literal">software</tt> <tt class="literal">is</tt> 1983<tt class="literal">being</tt> <tt class="literal">unfriendly</tt>, the initial 1984session request packet received a garbage response from the server. 1985The server might have crashed or started improperly. Go back to <a href="ch12.html#samba2-CHP-12-SECT-2.5.2">Section 12.2.5.2</a>, where the 1986problem is first analyzed.</p> 1987</li><li> 1988<p>If you suspect the server is not running, go back to 1989<a href="ch12.html#samba2-CHP-12-SECT-2.4.2">Section 12.2.4.2</a> to see why the server 1990daemon isn't responding.</p> 1991</li></ul> 1992 1993</div> 1994 1995 1996 1997<div class="sect3"><a name="samba2-CHP-12-SECT-2.6.2"/> 1998 1999<h3 class="head3">Testing the server with nmblookup</h3> 2000 2001<p><a name="INDEX-73"/><a name="INDEX-74"/>This will test the 2002"advertising" system used for 2003Windows name services and browsing. Advertising works by broadcasting 2004one's presence or willingness to provide services. 2005It is the part of browsing that uses an unreliable protocol (UDP) and 2006works only on broadcast networks such as Ethernets. The 2007<em class="emphasis">nmblookup</em> program broadcasts name queries for 2008the hostname you provide and returns its IP address and the name of 2009the system, much as <em class="emphasis">nslookup</em> does with DNS. 2010Here, the <em class="emphasis">-d</em> (debug or log-level) and 2011<em class="emphasis">-B</em> (broadcast address) options direct queries to 2012specific systems.</p> 2013 2014<p>First, we check the server from itself. Run 2015<em class="emphasis">nmblookup</em> with a <em class="emphasis">-B</em> option 2016of your server's name (to tell it to send the query 2017to the Samba server) and a parameter of <tt class="literal">_ _SAMBA_ 2018_</tt> as the symbolic name to look up. You should get:</p> 2019 2020<blockquote><pre class="code">$ <tt class="userinput"><b>nmblookup -B server _ _SAMBA_ _</b></tt> 2021Added interface ip=192.168.236.86 bcast=192.168.236.255 nmask=255.255.255.0 2022Sending queries to 192.168.236.86 192.168.236.86 _ _SAMBA_ _</pre></blockquote> 2023 2024<p>You should get the IP address of the server, followed by the name 2025<tt class="literal">_ _SAMBA_ _</tt> , which means that the server has 2026successfully advertised that it has a service called <tt class="literal">_ 2027_SAMBA_ _</tt> , and therefore at least part of NetBIOS name 2028service works.</p> 2029 2030<ul><li> 2031<p>If you get <tt class="literal">Name_query</tt> <tt class="literal">failed</tt> 2032<tt class="literal">to</tt> <tt class="literal">find</tt> <tt class="literal">name</tt> 2033<tt class="literal">_ _SAMBA_ _</tt>, you might have specified the server 2034name to the <em class="emphasis">-B</em> option, or 2035<em class="emphasis">nmbd</em> is not running. The <em class="emphasis">-B</em> 2036option actually takes a broadcast address: we're 2037using a computer name to get a unicast address and to ask the server 2038if it has claimed <tt class="literal">_ _SAMBA_ _</tt>. Try again with 2039<tt class="literal">nmblookup</tt> <tt class="literal">-B</tt> 2040<em class="replaceable">ip_address</em>, and if that fails too, 2041<em class="emphasis">nmbd</em> isn't claiming the name. 2042Go back briefly to the earlier section, "Testing 2043daemons with testparm," to see if 2044<em class="emphasis">nmbd</em> is running. If so, it might not be claiming 2045names; this means that Samba is not providing the browsing 2046service—a configuration problem. If that is the case, make sure 2047that <em class="filename">smb.conf</em> doesn't contain 2048the option <tt class="literal">browsing</tt> <tt class="literal">=</tt> 2049<tt class="literal">no</tt>.</p> 2050</li></ul> 2051 2052</div> 2053 2054 2055 2056<div class="sect3"><a name="samba2-CHP-12-SECT-2.6.3"/> 2057 2058<h3 class="head3">Testing the client with nmblookup</h3> 2059 2060<p><a name="INDEX-75"/><a name="INDEX-76"/>Next, check the IP address of the 2061client from the server with <em class="emphasis">nmblookup</em> using the 2062<tt class="literal">-B</tt> option for the client's name 2063and a parameter of '<tt class="literal">*</tt>' meaning 2064"anything," as shown here:</p> 2065 2066<blockquote><pre class="code">$ <b class="emphasis-bold">nmblookup -B client '*</b>' 2067Sending queries to 192.168.236.10 192.168.236.10 * 2068Got a positive name query response from 192.168.236.10 (192.168.236.10)</pre></blockquote> 2069 2070<p>You might get the following error:</p> 2071 2072<ul><li> 2073<p>If you receive <tt class="literal">Name-query</tt> 2074<tt class="literal">failed</tt> <tt class="literal">to</tt> 2075<tt class="literal">find</tt> <tt class="literal">name</tt> <tt class="literal">*</tt>, 2076you have made a spelling mistake, or the client software on the PC 2077isn't installed, started, or bound to TCP/IP. Double 2078back to <a href="ch03.html">Chapter 3</a> and ensure that you have a 2079client installed that is listening to the network.</p> 2080</li></ul> 2081<p>Repeat the command with the following options if you had any failures:</p> 2082 2083<ul><li> 2084<p>If <tt class="literal">nmblookup</tt> <tt class="literal">-B</tt> 2085<em class="replaceable">client_IP_address</em> succeeds but 2086<tt class="literal">nmblookup</tt> <tt class="literal">-B</tt> 2087<em class="replaceable">client_name</em> fails, there is a name service 2088problem with the client's name; go to <a href="ch12.html#samba2-CHP-12-SECT-2.7">Section 12.2.7</a>, later in this chapter.</p> 2089</li><li> 2090<p>If <tt class="literal">nmblookup</tt> <tt class="literal">-B</tt> 2091<tt class="literal">127.0.0.1</tt> '<tt class="literal">*</tt>' succeeds, but 2092<tt class="literal">nmblookup</tt> <tt class="literal">-B</tt> 2093<em class="replaceable">client_IP_address</em> fails, there is a 2094hardware problem, and <em class="emphasis">ping</em> should have failed. 2095See your network manager.</p> 2096</li></ul> 2097 2098</div> 2099 2100 2101 2102<div class="sect3"><a name="samba2-CHP-12-SECT-2.6.4"/> 2103 2104<h3 class="head3">Testing the network with nmblookup</h3> 2105 2106<p><a name="INDEX-77"/><a name="INDEX-78"/>Run the command 2107<em class="emphasis">nmblookup</em> again with a <em class="emphasis">-d2</em> 2108option (for a debug level of 2) and a parameter of 2109'<tt class="literal">*</tt>'. This time we are testing the ability of 2110programs (such as <em class="emphasis">nmbd</em> ) to use broadcast. 2111It's essentially a connectivity test, done via a 2112broadcast to the default broadcast address.</p> 2113 2114<p>A number of NetBIOS over TCP/IP hosts on the network should respond 2115with <tt class="literal">got</tt> <tt class="literal">a</tt> 2116<tt class="literal">positive</tt> <tt class="literal">name</tt> 2117<tt class="literal">query</tt> <tt class="literal">response</tt> messages. Samba 2118might not catch all the responses in the short time it listens, so 2119you won't always see all the SMB clients on the 2120network. However, you should see most of them:</p> 2121 2122<blockquote><pre class="code">$ <b class="emphasis-bold">nmblookup -d 2 '*</b>' 2123Added interface ip=192.168.236.86 bcast=192.168.236.255 nmask=255.255.255.0 Sending 2124queries to 192.168.236.255 2125Got a positive name query response from 192.168.236.191 (192.168.236.191) 2126Got a positive name query response from 192.168.236.228 (192.168.236.228) 2127Got a positive name query response from 192.168.236.75 (192.168.236.75) 2128Got a positive name query response from 192.168.236.79 (192.168.236.79) 2129Got a positive name query response from 192.168.236.206 (192.168.236.206) 2130Got a positive name query response from 192.168.236.207 (192.168.236.207) 2131Got a positive name query response from 192.168.236.217 (192.168.236.217) 2132Got a positive name query response from 192.168.236.72 (192.168.236.72) 192.168.236.86 *</pre></blockquote> 2133 2134<p>However:</p> 2135 2136<ul><li> 2137<p>If this doesn't give at least the client address you 2138previously tested, the default broadcast address is wrong. Try 2139<tt class="literal">nmblookup</tt> <tt class="literal">-B</tt> 2140<tt class="literal">255.255.255.255</tt> <tt class="literal">-d</tt> 2141<tt class="literal">2</tt> '<tt class="literal">*</tt>', which is a last-ditch 2142variant (using a broadcast address of all 1s). If this draws 2143responses, the broadcast address you've been using 2144before is wrong. Troubleshooting these is discussed in <a href="ch12.html#samba2-CHP-12-SECT-2.8.2">Section 12.2.8.2</a>, later in this 2145chapter.</p> 2146</li><li> 2147<p>If the address 255.255.255.255 fails too, check your notes to see if 2148your PC and server are on different subnets, as discovered in the 2149earlier section, <a href="ch12.html#samba2-CHP-12-SECT-2.2.4">Section 12.2.2.4</a>. You 2150should try to diagnose this step with a server and client on the same 2151subnet, but if you can't, you can try specifying the 2152remote subnet's broadcast address with 2153<em class="emphasis">-B</em>. Finding that address is discussed in <a href="ch12.html#samba2-CHP-12-SECT-2.8.2">Section 12.2.8.2</a>, later in this 2154chapter. The <em class="emphasis">-B</em> option will work if your router 2155supports directed broadcasts; if it doesn't, you 2156might be forced to test with a client on the same network.</p> 2157</li></ul> 2158<p>As usual, you can check the Samba log files for additional clues.</p> 2159 2160 2161</div> 2162 2163 2164 2165<div class="sect3"><a name="samba2-CHP-12-SECT-2.6.5"/> 2166 2167<h3 class="head3">Testing client browsing with net view</h3> 2168 2169<p><a name="INDEX-79"/><a name="INDEX-80"/>On the client, run the 2170command <em class="replaceable">net view \\server</em> in an MS-DOS 2171(command prompt) window to see if you can connect to the client and 2172ask what shares it provides. You should get back a list of available 2173shares on the server.</p> 2174 2175<p>If this works, continue with the later section <a href="ch12.html#samba2-CHP-12-SECT-3.1">Section 12.3.1</a>. Otherwise:</p> 2176 2177<ul><li> 2178<p>If you get <tt class="literal">Network</tt> <tt class="literal">name</tt> 2179<tt class="literal">not</tt> <tt class="literal">found</tt> for the name you just 2180tested in the earlier section, <a href="ch12.html#samba2-CHP-12-SECT-2.6.3">Section 12.2.6.3</a>, there is a problem with the 2181client software itself. Double-check this by running 2182<em class="emphasis">nmblookup</em> on the client; if it works and 2183<em class="emphasis">net view</em> doesn't, the client is 2184at fault.</p> 2185</li><li> 2186<p>If <em class="emphasis">nmblookup</em> fails, there is a NetBIOS name 2187service problem, as discussed in the later section, <a href="ch12.html#samba2-CHP-12-SECT-2.9">Section 12.2.9</a>.</p> 2188</li><li> 2189<p>If you get <tt class="literal">You</tt> <tt class="literal">do</tt> 2190<tt class="literal">not</tt> <tt class="literal">have</tt> <tt class="literal">the</tt> 2191<tt class="literal">necessary</tt> <tt class="literal">access</tt> 2192<tt class="literal">rights</tt>, or <tt class="literal">This</tt> 2193<tt class="literal">server</tt> <tt class="literal">is</tt> 2194<tt class="literal">not</tt> <tt class="literal">configured</tt> 2195<tt class="literal">to</tt> <tt class="literal">list</tt> 2196<tt class="literal">shared</tt> <tt class="literal">resources</tt>, either your 2197guest account is misconfigured (see the earlier section, <a href="ch12.html#samba2-CHP-12-SECT-2.5.2">Section 12.2.5.2</a>) or you have a 2198<tt class="literal">hosts</tt> <tt class="literal">allow</tt> or 2199<tt class="literal">hosts</tt> <tt class="literal">deny</tt> line that prohibits 2200connections from your system. These problems should have been 2201detected by the <em class="emphasis">smbclient</em> tests starting in the 2202earlier section, <a href="ch12.html#samba2-CHP-12-SECT-2.6.1">Section 12.2.6.1</a>.</p> 2203</li><li> 2204<p>If you get <tt class="literal">The</tt> <tt class="literal">specified</tt> 2205<tt class="literal">computer</tt> <tt class="literal">is</tt> 2206<tt class="literal">not</tt> <tt class="literal">receiving</tt> 2207<tt class="literal">requests</tt>, you have misspelled the name, the system 2208is unreachable by broadcast (tested in the earlier section, <a href="ch12.html#samba2-CHP-12-SECT-2.6.4">Section 12.2.6.4</a>), or it's 2209not running <em class="emphasis">nmbd</em>.</p> 2210</li><li> 2211<p>If you get <tt class="literal">Bad</tt> <tt class="literal">password</tt> 2212<tt class="literal">error</tt>, you're probably 2213encountering the Microsoft-encrypted password problem, as discussed 2214earlier in this chapter and in <a href="ch09.html">Chapter 9</a>, with its 2215corrections.</p> 2216</li></ul> 2217 2218</div> 2219 2220 2221 2222<div class="sect3"><a name="samba2-CHP-12-SECT-2.6.6"/> 2223 2224<h3 class="head3">Browsing the server from the client</h3> 2225 2226<p><a name="INDEX-81"/><a name="INDEX-82"/>From the Windows Network 2227Neighborhood (or My Network Places in newer releases), try to browse 2228the server. Your Samba server should appear in the browse list of 2229your local workgroup. You should be able to double-click the name of 2230the server to get a list of shares.</p> 2231 2232<ul><li> 2233<p>If you get an <tt class="literal">Invalid</tt> <tt class="literal">password</tt> 2234error, it's most likely the encryption problem 2235again.</p> 2236</li><li> 2237<p>If you receive an <tt class="literal">Unable</tt> <tt class="literal">to</tt> 2238<tt class="literal">browse</tt> <tt class="literal">the</tt> 2239<tt class="literal">network</tt> error, one of the following has occurred:</p> 2240<ul><li> 2241<p>You have looked too soon, before the broadcasts and updates have 2242completed. Wait 30 seconds and try again.</p> 2243</li><li> 2244<p>There is a network problem you've not yet diagnosed.</p> 2245</li><li> 2246<p>There is no browse master. Add the configuration option 2247<tt class="literal">local</tt> <tt class="literal">master</tt> 2248<tt class="literal">=</tt> <tt class="literal">yes</tt> to your 2249<em class="emphasis">smb.conf</em> file.</p> 2250</li><li> 2251<p>No shares are made browsable in the <em class="emphasis">smb.conf</em> 2252file.</p> 2253</li></ul> 2254</li> 2255<li> 2256<p>If you receive the message <tt class="literal">\\server</tt> 2257<tt class="literal">is</tt> <tt class="literal">not</tt> 2258<tt class="literal">accessible</tt> then:</p> 2259<ul><li> 2260<p>You have the encrypted password problem.</p> 2261</li><li> 2262<p>The system really isn't accessible.</p> 2263</li><li> 2264<p>The system doesn't support browsing.</p> 2265</li></ul> 2266</li> 2267</ul> 2268 2269<p>If you've made it this far and the problem is not 2270yet solved, either the problem is one we've not yet 2271seen, or it is a problem related to a topic we have already covered, 2272and further analysis is required. Name resolution is often related to 2273difficulties with Samba, so we cover it in more detail in the next 2274sections. If you know your problem is not related to name resolution, 2275skip to the <a href="ch12.html#samba2-CHP-12-SECT-3">Section 12.3</a> at the end of the chapter. <a name="INDEX-83"/><a name="INDEX-84"/></p> 2276 2277 2278</div> 2279 2280 2281</div> 2282 2283 2284<div class="sect2"><a name="samba2-CHP-12-SECT-2.7"/> 2285 2286<h3 class="head2">Troubleshooting Name Services</h3> 2287 2288<p><a name="INDEX-85"/><a name="INDEX-86"/>This 2289section looks at simple troubleshooting of all the name services 2290you'll encounter, but only for the common problems 2291that affect Samba.</p> 2292 2293<p>There are several good references for troubleshooting particular name 2294services: Paul <a name="INDEX-87"/>Albitz and Cricket <a name="INDEX-88"/>Liu's <em class="emphasis">DNS and 2295Bind</em> (O'Reilly) covers the DNS, Hal 2296<a name="INDEX-89"/>Stern's <em class="emphasis">NFS and 2297NIS</em> (O'Reilly) covers NIS 2298("Yellow pages"), while Windows 2299Internet Name Service (WINS), <em class="filename">hosts/LMHOSTS</em> 2300files, and NIS+ are best covered by their respective 2301vendors' manuals.</p> 2302 2303<p>The problems addressed in this section are as follows:</p> 2304 2305<ul><li> 2306<p>Name services are identified.</p> 2307</li><li> 2308<p>A hostname can't be looked up.</p> 2309</li><li> 2310<p>The long (FQDN) form of a hostname works but the short form 2311doesn't.</p> 2312</li><li> 2313<p>The short form of the name works, but the long form 2314doesn't.</p> 2315</li><li> 2316<p>A long delay occurs before the expected result.</p> 2317</li></ul> 2318 2319<div class="sect3"><a name="samba2-CHP-12-SECT-2.7.1"/> 2320 2321<h3 class="head3">Identifying what's in use</h3> 2322 2323<p><a name="INDEX-90"/>First, see if both the 2324server and the client are using DNS, WINS, NIS, or 2325<em class="filename">hosts</em> files to look up IP addresses when you 2326give them a name. Each kind of system has a different preference:</p> 2327 2328<ul><li> 2329<p>Windows 95/98/Me tries WINS and the <em class="filename">LMHOSTS</em> file 2330first, then broadcast, and finally DNS and <em class="filename">HOSTS</em> 2331files.</p> 2332</li><li> 2333<p>Windows NT/2000/XP tries WINS, then broadcast, then the 2334<em class="filename">LMHOSTS</em> file, and finally 2335<em class="filename">HOSTS</em> and DNS.</p> 2336</li><li> 2337<p>Windows programs using the WINSOCK standard use the HOSTS file, DNS, 2338WINS, and then broadcast. Don't assume that if a 2339different program's name service works, the SMB 2340client program's name service will!</p> 2341</li><li> 2342<p>Samba daemons use <em class="filename">lmhosts</em>, WINS, the Unix 2343system's name resolution, and then broadcast.</p> 2344</li><li> 2345<p>Unix systems can be configured to use any combination of DNS, 2346<em class="filename">HOSTS</em> files, NIS or NIS+, and winbind, generally 2347in any order.</p> 2348</li></ul> 2349<p>We recommend that the client systems be configured to use WINS and 2350DNS, the Samba daemons to use WINS and DNS, and the Unix server to 2351use DNS, <em class="filename">hosts</em> files, and perhaps NIS+. 2352You'll have to look at your notes and the actual 2353systems to see which is in use.</p> 2354 2355<p>On the clients, the name services are all set in the TCP/IP 2356Properties panel of the Networking Control Panel, as discussed in 2357<a href="ch03.html">Chapter 3</a>. You might need to check there to see 2358what you've actually turned on. On the server, see 2359if a <em class="filename">/etc/resolv.conf</em> file exists. If it does, 2360you're using DNS. You might be using the others as 2361well, though. You'll need to check for NIS and 2362combinations of services.</p> 2363 2364<p>Check for a <em class="filename">/etc/nsswitch.conf</em> file on Solaris 2365and other System V Unix operating systems. If you have one, look for 2366a line that begins with <tt class="literal">host</tt>: followed by one or 2367more of <tt class="literal">files</tt>, <tt class="literal">bind</tt>, 2368<tt class="literal">nis</tt>, or <tt class="literal">nis+</tt>. These are the 2369name services to use, in order, with optional extra material in 2370square brackets. The <tt class="literal">files</tt> keyword is for 2371using <em class="emphasis">HOSTS</em> files, while <tt class="literal">bind</tt> 2372(the Berkeley Internet Name Daemon) refers to using DNS.</p> 2373 2374<p>If the client and server differ, the first thing to do is to get them 2375in sync. Clients can use DNS, WINS, <em class="emphasis">HOSTS</em>, and 2376<em class="emphasis">LMHOSTS</em> files, but not NIS or NIS+. Servers can 2377use <em class="emphasis">HOSTS</em> and <em class="filename">LMHOSTS</em> 2378files, DNS, NIS or NIS+, and winbind, but not WINS—even if your 2379Samba server provides WINS services. If you can't 2380get all the systems to use the same services, you'll 2381have to check the server and the client carefully for the same data.</p> 2382 2383<p>You can also make use of the <em class="emphasis">-R</em> (resolve order) 2384option for <em class="emphasis">smbclient</em>. If you want to 2385troubleshoot WINS, for example, you'd say:</p> 2386 2387<blockquote><pre class="code">$ <tt class="userinput"><b>smbclient -L </b></tt><em class="replaceable">server</em> <tt class="userinput"><b>-R wins</b></tt></pre></blockquote> 2388 2389<p>The possible settings are <tt class="literal">hosts</tt> (which means 2390whatever the Unix system is using, not just<em class="filename"> 2391/etc/hosts</em> files), <tt class="literal">lmhosts</tt>, 2392<tt class="literal">wins</tt>, and <tt class="literal">bcast</tt> (broadcast).</p> 2393 2394<p>In the following sections, we use the term <em class="emphasis">long 2395name</em> for a fully qualified domain name (FQDN), such as 2396<tt class="literal">server.example.com</tt> , and the term <em class="emphasis">short 2397name</em> for the host part of an FQDN, such as 2398<tt class="literal">server</tt>.</p> 2399 2400 2401</div> 2402 2403 2404 2405<div class="sect3"><a name="samba2-CHP-12-SECT-2.7.2"/> 2406 2407<h3 class="head3">Cannot look up hostnames</h3> 2408 2409<p><a name="INDEX-91"/>Try the 2410following:</p> 2411 2412<dl> 2413<dt><b>DNS</b></dt> 2414<dd> 2415<p>Run <tt class="literal">nslookup</tt> <em class="replaceable">name</em>. If 2416this fails, look for a <em class="filename">resolv.conf</em> error, a 2417downed DNS server, or a short/long name problem (see the next 2418section). Try the following:</p> 2419 2420 2421<ul><li> 2422<p>Your <em class="filename">/etc/resolv.conf</em> file should contain one or 2423more <tt class="literal">nameserver</tt> lines, each with an IP address. 2424These are the addresses of your DNS servers.</p> 2425</li><li> 2426<p>Ping each server address you find. If this fails for one, suspect the 2427system. If it fails for each, suspect your network.</p> 2428</li><li> 2429<p>Retry the lookup using the full domain name (e.g., 2430<tt class="literal">server.example.com</tt>) if you tried the short name 2431first, or the short name if you tried the long name first. If results 2432differ, skip to the next section.</p> 2433</li></ul> 2434</dd> 2435 2436 2437 2438<dt><b>Broadcast/ WINS</b></dt> 2439<dd> 2440<p>Broadcast/ WINS does only short names such as 2441<tt class="literal">server</tt>, and not long ones, such as 2442<tt class="literal">server.example.com</tt>. Run 2443<tt class="literal">nmblookup</tt> <tt class="literal">-S</tt> 2444<em class="replaceable">server</em>. This reports everything broadcast 2445has registered for the name. In our example, it looks like this:</p> 2446 2447<blockquote><pre class="code">$ <tt class="userinput"><b>nmblookup -S server</b></tt> 2448Looking up status of 192.168.236.86 2449received 10 names 2450 SERVER <00> - M <ACTIVE> 2451 SERVER <03> - M <ACTIVE> 2452 SERVER <1f> - M <ACTIVE> 2453 SERVER <20> - M <ACTIVE> 2454 ..__MSBROWSE__. <01> - <GROUP> M <ACTIVE> 2455 MYGROUP <00> - <GROUP> M <ACTIVE> 2456 MYGROUP <1b> - M <ACTIVE> 2457 MYGROUP <1c> - <GROUP> M <ACTIVE> 2458 MYGROUP <1d> - M <ACTIVE> 2459 MYGROUP <1e> - <GROUP> M <ACTIVE></pre></blockquote> 2460 2461<p>The required entry is <tt class="literal">SERVER</tt> 2462<tt class="literal"><00></tt>, which identifies 2463<em class="replaceable">server</em> as being this 2464system's NetBIOS name. You should also see your 2465workgroup mentioned one or more times. If these lines are missing, 2466Broadcast/WINS cannot look up names and will need attention.</p> 2467 2468<a name="samba2-CHP-12-NOTE-160"/><blockquote class="note"><h4 class="objtitle">TIP</h4> 2469<p>The numbers in angle brackets in the previous output identify NetBIOS 2470names as being workgroups, workstations, and file users of the 2471messenger service, master browsers, domain master browsers, domain 2472controllers, and a plethora of others. We primarily use 2473<tt class="literal"><00></tt> to identify system and workgroup names 2474and <tt class="literal"><20></tt> to identify systems as servers. The 2475complete list is available at <a href="http://support.microsoft.com/support/kb/articles/q163/4/09.asp">http://support.microsoft.com/support/kb/articles/q163/4/09.asp</a>.</p> 2476</blockquote> 2477</dd> 2478 2479 2480 2481<dt><b>NIS</b></dt> 2482<dd> 2483<p>Try <tt class="literal">ypmatch</tt> <tt class="literal">name</tt> 2484<tt class="literal">hosts</tt>. If this fails, NIS is down. Find out the 2485NIS server's name by running 2486<em class="emphasis">ypwhich</em>, and ping the system to see if 2487it's accessible.</p> 2488</dd> 2489 2490 2491 2492<dt><b>NIS+</b></dt> 2493<dd> 2494<p>If you're running NIS+, try 2495<tt class="literal">nismatch</tt> <tt class="literal">name</tt> 2496<tt class="literal">hosts</tt>. If this fails, NIS is down. Find out the 2497NIS+ server's name by running 2498<em class="emphasis">niswhich</em>, and ping that system to see if 2499it's accessible.</p> 2500</dd> 2501 2502 2503 2504<dt><b>hosts and HOSTS files</b></dt> 2505<dd> 2506<p>Inspect the <em class="filename">HOSTS</em> file on the client 2507(<em class="filename">C:\Windows\ Hosts</em> on Windows 95/98/Me, and 2508<em class="filename">C:\WINNT \system32\drivers\etc\hosts</em> on Windows 2509NT/2000/XP). Each line should have an IP number and one or more 2510names, the primary name first, then any optional aliases. An example 2511follows:</p> 2512 2513 2514<blockquote><pre class="code">127.0.0.1 localhost 2515192.168.236.1 dns.svc.example.com 2516192.168.236.10 client.example.com client 2517192.168.236.11 backup.example.com loghost 2518192.168.236.86 server.example.com server 2519192.168.236.254 router.svc.example.com</pre></blockquote> 2520 2521<p>On Unix, <tt class="literal">localhost</tt> should always be 127.0.0.1, 2522although it might be just an alias for a hostname on the PC. On the 2523client, check that there are no <tt class="literal">#XXX</tt> directives at 2524the ends of the lines; these are LAN Manager/NetBIOS directives and 2525should appear only in <em class="emphasis">LMHOSTS</em> files.</p> 2526</dd> 2527 2528 2529 2530<dt><b>LMHOSTS files</b></dt> 2531<dd> 2532<p>This file is a local source for LAN Manager (NetBIOS) names. It has a 2533format similar to <em class="filename">hosts</em> files, but it does not 2534support long-form domain names (e.g., 2535<tt class="literal">server.example.com</tt>) and can have a number of 2536optional <tt class="literal">#XXX</tt> directives following the NetBIOS 2537names. There is usually an <em class="emphasis">lmhosts.sam</em> (for 2538sample) file located in <em class="filename">C:\Windows</em> on Windows 253995/98/Me, and in <em class="filename">C:\WINNT\system32\drivers\etc</em> 2540on Windows NT/2000/XP, but it's not used unless it 2541is renamed to <em class="emphasis">Lmhosts</em> in the same directory.</p> 2542</dd> 2543 2544</dl> 2545 2546 2547</div> 2548 2549 2550 2551<div class="sect3"><a name="samba2-CHP-12-SECT-2.7.3"/> 2552 2553<h3 class="head3">Long and short hostnames</h3> 2554 2555<p><a name="INDEX-92"/>Where the long (FQDN) form of a hostname 2556works but the short name doesn't (for example, 2557<tt class="literal">client.example.com</tt> works but 2558<tt class="literal">client</tt> doesn't), consider the 2559following:</p> 2560 2561<dl> 2562<dt><b>DNS </b></dt> 2563<dd> 2564<p>This usually indicates that there is no default domain in which to 2565look up the short names. Look for a <tt class="literal">default</tt> line 2566in <em class="filename">/etc/resolv.conf</em> on the Samba server with 2567your domain in it, or look for a <tt class="literal">search</tt> line with 2568one or more domains in it. One or the other might need to be present 2569to make short names usable; which one depends on the vendor and 2570version of the DNS resolver. Try adding <tt class="literal">domain</tt> 2571<em class="replaceable">your_domain</em> to 2572<em class="filename">resolv.conf</em>, and ask your network or DNS 2573administrator what should be in the file.</p> 2574</dd> 2575 2576 2577 2578<dt><b>Broadcast/WINS </b></dt> 2579<dd> 2580<p>Broadcast/WINS doesn't support long names; it 2581won't suffer from this problem.</p> 2582</dd> 2583 2584 2585 2586<dt><b>NIS </b></dt> 2587<dd> 2588<p>Try the command <tt class="literal">ypmatch</tt> 2589<em class="replaceable">hostname</em> <tt class="literal">hosts</tt>. If you 2590don't get a match, your tables 2591don't include short names. Speak to your network 2592manager; short names might be missing by accident or might be 2593unsupported as a matter of policy. Some sites don't 2594ever use (ambiguous) short names.</p> 2595</dd> 2596 2597 2598 2599<dt><b>NIS+</b></dt> 2600<dd> 2601<p>Try <tt class="literal">nismatch</tt> <em class="replaceable">hostname</em> 2602<tt class="literal">hosts</tt>, and treat failure exactly as with NIS.</p> 2603</dd> 2604 2605 2606 2607<dt><b>hosts </b></dt> 2608<dd> 2609<p>If the short name is not in <em class="filename">/etc/hosts</em>, consider 2610adding it as an alias. Avoid, if you can, short names as primary 2611names (the first one on a line). Have them as aliases if your system 2612permits.</p> 2613</dd> 2614 2615 2616 2617<dt><b>LMHOSTS </b></dt> 2618<dd> 2619<p>LAN Manager doesn't support long names, so it 2620won't suffer from this problem.</p> 2621</dd> 2622 2623</dl> 2624 2625<p>On the other hand, if the short form of the name works and the long 2626form doesn't, consider the following:</p> 2627 2628<dl> 2629<dt><b>DNS </b></dt> 2630<dd> 2631<p>This is bizarre; see your network or DNS administrator, as this is 2632probably a DNS setup error.</p> 2633</dd> 2634 2635 2636 2637<dt><b>Broadcast/WINS </b></dt> 2638<dd> 2639<p>This is normal; Broadcast/WINS can't use the long 2640form. Optionally, consider DNS. (Be aware that Microsoft has stated 2641that it will eventually switch entirely to DNS, even though DNS does 2642not provide name types such as <00>.)</p> 2643</dd> 2644 2645 2646 2647<dt><b>NIS</b></dt> 2648<dd> 2649<p>If you can use <em class="emphasis">ypmatch</em> to look up the short form 2650but not the long, consider adding the long form to the table as at 2651least an alias.</p> 2652</dd> 2653 2654 2655 2656<dt><b>NIS+ </b></dt> 2657<dd> 2658<p>Same as NIS, except you use <em class="emphasis">nismatch</em> instead of 2659<em class="emphasis">ypmatch</em> to look up names.</p> 2660</dd> 2661 2662 2663 2664<dt><b>hosts and HOSTS</b></dt> 2665<dd> 2666<p>Add the long name as at least an alias, and preferably as the primary 2667form. Also consider using DNS if it's practical.</p> 2668</dd> 2669 2670 2671 2672<dt><b>LMHOSTS </b></dt> 2673<dd> 2674<p>This is normal. LAN Manager can't use the long form; 2675consider switching to DNS or <em class="filename">hosts</em>.</p> 2676</dd> 2677 2678</dl> 2679 2680 2681</div> 2682 2683 2684 2685<div class="sect3"><a name="samba2-CHP-12-SECT-2.7.4"/> 2686 2687<h3 class="head3">Unusual delays</h3> 2688 2689<p><a name="INDEX-93"/>When there is a long delay before the 2690expected result:</p> 2691 2692<dl> 2693<dt><b>DNS </b></dt> 2694<dd> 2695<p>Test the same name with the <em class="emphasis">nslookup</em> command on 2696the system that is slow (client or server). If 2697<em class="emphasis">nslookup</em> is also slow, you have a DNS problem. 2698If it's slower on a client, you might have too many 2699protocols bound to the Ethernet card. Eliminate NetBEUI, which is 2700infamously slow, and, optionally, Novell—assuming you 2701don't need them. This is especially important on 2702Windows 95, which is particularly sensitive to excess protocols.</p> 2703</dd> 2704 2705 2706 2707<dt><b>Broadcast/ WINS</b></dt> 2708<dd> 2709<p>Test the client using <em class="emphasis">nmblookup</em>; if 2710it's faster, you probably have the protocols problem 2711as mentioned in the previous item.</p> 2712</dd> 2713 2714 2715 2716<dt><b>NIS</b></dt> 2717<dd> 2718<p>Try <em class="emphasis">ypmatch</em>; if it's slow, 2719report the problem to your network manager.</p> 2720</dd> 2721 2722 2723 2724<dt><b>NIS+ </b></dt> 2725<dd> 2726<p>Try <em class="emphasis">nismatch</em>, similarly.</p> 2727</dd> 2728 2729 2730 2731<dt><b>hosts and HOSTS</b></dt> 2732<dd> 2733<p>The <em class="emphasis">hosts</em> files, if of reasonable size, are 2734always fast. You probably have the protocols problem mentioned 2735previously under DNS.</p> 2736</dd> 2737 2738 2739 2740<dt><b>lmhosts and LMHOSTS</b></dt> 2741<dd> 2742<p>This is not a name lookup problem; <em class="emphasis">LMHOSTS</em> files 2743are as fast as <em class="emphasis">hosts</em> and 2744<em class="filename">HOSTS</em> files.</p> 2745</dd> 2746 2747</dl> 2748 2749 2750</div> 2751 2752 2753 2754<div class="sect3"><a name="samba2-CHP-12-SECT-2.7.5"/> 2755 2756<h3 class="head3">Localhost issues</h3> 2757 2758<p><a name="INDEX-94"/>When a localhost isn't 2759127.0.0.1, try the following:</p> 2760 2761<dl> 2762<dt><b>DNS</b></dt> 2763<dd> 2764<p>There is probably no record for <tt class="literal">localhost</tt>. 2765<tt class="literal">A</tt> <tt class="literal">127.0.0.1</tt>. Arrange to add 2766one, as well as a reverse entry, 2767<tt class="literal">1.0.0.127.IN-ADDR.ARPA</tt> <tt class="literal">PTR</tt> 2768<tt class="literal">127.0.0.1</tt>.</p> 2769</dd> 2770 2771 2772 2773<dt><b>Broadcast/WINS</b></dt> 2774<dd> 2775<p>Not applicable.</p> 2776</dd> 2777 2778 2779 2780<dt><b>NIS</b></dt> 2781<dd> 2782<p>If <tt class="literal">localhost</tt> isn't in the table, 2783add it.</p> 2784</dd> 2785 2786 2787 2788<dt><b>NIS+ </b></dt> 2789<dd> 2790<p>If <tt class="literal">localhost</tt> isn't in the table, 2791add it.</p> 2792</dd> 2793 2794 2795 2796<dt><b>hosts and HOSTS</b></dt> 2797<dd> 2798<p>Add a line that says <tt class="literal">127.0.0.1</tt> 2799<tt class="literal">localhost</tt>.</p> 2800</dd> 2801 2802 2803 2804<dt><b>LMHOSTS</b></dt> 2805<dd> 2806<p>Not applicable. <a name="INDEX-95"/><a name="INDEX-96"/></p> 2807</dd> 2808 2809</dl> 2810 2811 2812</div> 2813 2814 2815</div> 2816 2817 2818<div class="sect2"><a name="samba2-CHP-12-SECT-2.8"/> 2819 2820<h3 class="head2">Troubleshooting Network Addresses</h3> 2821 2822<p><a name="INDEX-97"/><a name="INDEX-98"/>A 2823number of common problems are caused by incorrect routing of Internet 2824addresses or by the incorrect assignment of addresses. This section 2825helps you determine what your addresses are.</p> 2826 2827 2828<div class="sect3"><a name="samba2-CHP-12-SECT-2.8.1"/> 2829 2830<h3 class="head3">Netmasks</h3> 2831 2832<p>Using the <a name="INDEX-99"/>netmask, it is possible to 2833determine which addresses can be reached directly (i.e., which are on 2834the local network) and which addresses require forwarding packets 2835through a router. If the netmask is wrong, the systems will make one 2836of two mistakes. One is to route local packets via a router, which is 2837an expensive waste of time—it might work reasonably fast, it 2838might run slowly, or it might fail utterly. The second mistake is to 2839fail to send packets from a remote system to the router, which will 2840prevent them from being forwarded to the remote system.</p> 2841 2842<p>The netmask is a number like an IP address, with one-bits for the 2843network part of an address and zero-bits for the host portion. It is 2844used as a bitmask to mask off parts of the address inside the TCP/IP 2845code. If the mask is 255.255.0.0, the first 2 bytes are the network 2846part and the last 2 are the host part. More common is 255.255.255.0, 2847in which the first 3 bytes are the network part and the last one is 2848the host part.</p> 2849 2850<p>For example, let's say your IP address is 2851192.168.0.10 and the Samba server is 192.168.236.86. If your netmask 2852happens to be 255.255.255.0, the network part of the address is the 2853first 3 bytes, and the host part is the last byte. In this case, the 2854network parts are different, and the systems are on different 2855networks:</p> 2856 2857<a name="ch12-37-fm2xml"/><table border="1"> 2858 2859 2860 2861<tr> 2862<th> 2863<p>Network part</p> 2864</th> 2865<th> 2866<p>Host part</p> 2867</th> 2868</tr> 2869 2870 2871<tr> 2872<td> 2873<p>192 168 000</p> 2874</td> 2875<td> 2876<p>10</p> 2877</td> 2878</tr> 2879<tr> 2880<td> 2881<p>192 168 235</p> 2882</td> 2883<td> 2884<p>86</p> 2885</td> 2886</tr> 2887 2888</table> 2889 2890<p>If your netmask happens to be 255.255.0.0, the network part is just 2891the first 2 bytes. In this case, the network parts match, and so the 2892two systems are on the same network:</p> 2893 2894<a name="ch12-38-fm2xml"/><table border="1"> 2895 2896 2897 2898<tr> 2899<th> 2900<p>Network part</p> 2901</th> 2902<th> 2903<p>Host part</p> 2904</th> 2905</tr> 2906 2907 2908<tr> 2909<td> 2910<p>192 168</p> 2911</td> 2912<td> 2913<p>000 10</p> 2914</td> 2915</tr> 2916<tr> 2917<td> 2918<p>192 168</p> 2919</td> 2920<td> 2921<p>236 86</p> 2922</td> 2923</tr> 2924 2925</table> 2926 2927<p>Make sure the netmask in use on each system matches the structure of 2928your network. On every subnet, the netmask should be identical on 2929each system.</p> 2930 2931 2932</div> 2933 2934 2935 2936<div class="sect3"><a name="samba2-CHP-12-SECT-2.8.2"/> 2937 2938<h3 class="head3">Broadcast addresses</h3> 2939 2940<p>The <a name="INDEX-100"/>broadcast address is a normal address, 2941with the hosts part all one-bits. It means "all 2942hosts on your network." You can compute it easily 2943from your netmask and address: take the address and put one-bits in 2944it for all the bits that are zero at the end of the netmask (the host 2945part). The following table illustrates this:</p> 2946 2947<a name="ch12-39-fm2xml"/><table border="1"> 2948 2949 2950 2951 2952<tr> 2953<th> 2954</th> 2955<th> 2956<p>Network part</p> 2957</th> 2958<th> 2959<p>Host part</p> 2960</th> 2961</tr> 2962 2963 2964<tr> 2965<td> 2966<p>IP address</p> 2967</td> 2968<td> 2969<p>192 168 236</p> 2970</td> 2971<td> 2972<p>86</p> 2973</td> 2974</tr> 2975<tr> 2976<td> 2977<p>Netmask</p> 2978</td> 2979<td> 2980<p>255 255 255</p> 2981</td> 2982<td> 2983<p>000</p> 2984</td> 2985</tr> 2986<tr> 2987<td> 2988<p>Broadcast</p> 2989</td> 2990<td> 2991<p>192 168 236</p> 2992</td> 2993<td> 2994<p>255</p> 2995</td> 2996</tr> 2997 2998</table> 2999 3000<p>In this example, the broadcast address on the 192.168.236 network is 3001192.168.236.255. There is also an old 3002"universal" broadcast address, 3003255.255.255.255. Routers are prohibited from forwarding these, but 3004most systems on your local network will respond to broadcasts to this 3005address.</p> 3006 3007 3008</div> 3009 3010 3011 3012<div class="sect3"><a name="samba2-CHP-12-SECT-2.8.3"/> 3013 3014<h3 class="head3">Network address ranges</h3> 3015 3016<p>A <a name="INDEX-101"/>number of address ranges have been 3017reserved for testing and for nonconnected networks; we use these for 3018the examples in this book. If you don't have an 3019address yet, feel free to use one of these to start. They include one 3020class A network, 10.*.*.*, a range of class B network addresses, 3021172.16.*.* through 172.31.*.*, and 254 class C networks, 192.168.1.* 3022through 192.168.254.*. The domain <tt class="literal">example.com</tt> is 3023also reserved for unconnected networks, explanatory examples, and 3024books.</p> 3025 3026<p>If you're actually connecting to the Internet, 3027you'll need to get an appropriate IP address and a 3028domain name, probably through the same company that provides your 3029connection.</p> 3030 3031 3032</div> 3033 3034 3035 3036<div class="sect3"><a name="samba2-CHP-12-SECT-2.8.4"/> 3037 3038<h3 class="head3">Finding your network address</h3> 3039 3040<p><a name="INDEX-102"/>If you 3041haven't recorded your IP address, you can learn it 3042through the <em class="emphasis">ifconfig</em><a name="INDEX-103"/> command on Unix or the 3043<em class="emphasis">ipconfig</em> <a name="INDEX-104"/>command on Windows. (Check your manual 3044pages for any options required by your brand of Unix. For example, 3045<tt class="literal">ifconfig</tt> <tt class="literal">-a</tt> works on Solaris.) 3046You should see output similar to the following:</p> 3047 3048<blockquote><pre class="code">$ <tt class="userinput"><b>ifconfig -a</b></tt> 3049le0: flags=63<UP,BROADCAST,NOTRAILERS,RUNNING > 3050 inet 192.168.236.11 netmask ffffff00 broadcast 192.168.236.255 3051lo0: flags=49<&lt>UP,LOOPBACK,RUNNING<&gt> 3052 inet 127.0.0.1 netmask ff000000</pre></blockquote> 3053 3054<p>One of the interfaces will be loopback (in our examples, 3055<tt class="literal">lo0</tt>), and the other will be the regular IP 3056interface. The flags should show that the interface is running, and 3057Ethernet interfaces will also say they support broadcasts (PPP 3058interfaces don't). The other places to look for IP 3059addresses are <em class="filename">/etc/hosts</em> files, Windows 3060<em class="emphasis">HOSTS</em> files, Windows 3061<em class="emphasis">LMHOSTS</em> files, NIS, NIS+, and DNS. <a name="INDEX-105"/><a name="INDEX-106"/></p> 3062 3063 3064</div> 3065 3066 3067</div> 3068 3069 3070<div class="sect2"><a name="samba2-CHP-12-SECT-2.9"/> 3071 3072<h3 class="head2">Troubleshooting NetBIOS Names</h3> 3073 3074<p><a name="INDEX-107"/><a name="INDEX-108"/>Historically, SMB protocols have 3075depended on the NetBIOS name system, also called the LAN Manager name 3076system. This was a simple scheme where each system had a unique 307720-character name and broadcast it on the LAN for everyone to know. 3078With TCP/IP, we tend to use names such as 3079<tt class="literal">client.example.com</tt>, stored in 3080<em class="filename">/etc/hosts</em> files through DNS or WINS.</p> 3081 3082<p>The usual mapping of domain names such as 3083<tt class="literal">server.example.com</tt> to NetBIOS names simply uses 3084the <tt class="literal">server</tt> part as the NetBIOS name and converts 3085it to uppercase. Alas, this doesn't always work, 3086especially if you have a system with a 21-character name; not 3087everyone uses the same NetBIOS and DNS names. For example, 3088<tt class="literal">corpvm1</tt> along with <tt class="literal">vm1.corp.com</tt> 3089is not unusual.</p> 3090 3091<p>A system with a different NetBIOS name and domain name is confusing 3092when you're troubleshooting; we recommend that you 3093try to avoid this wherever possible. NetBIOS names are discoverable 3094with <em class="emphasis">smbclient</em> :</p> 3095 3096<ul><li> 3097<p>If you can list shares on your Samba server with 3098<tt class="literal">smbclient</tt> <tt class="literal">-L</tt> 3099<tt class="literal">short_name</tt>, the short name is the NetBIOS name.</p> 3100</li><li> 3101<p>If you get <tt class="literal">Get_Hostbyname</tt>: 3102<tt class="literal">Unknown</tt> <tt class="literal">host</tt> 3103<tt class="literal">name</tt>, there is probably a mismatch. Check in the 3104<em class="filename">smb.conf</em> file to see if the NetBIOS name is 3105explicitly set.</p> 3106</li><li> 3107<p>Try to list shares again, specifying <tt class="literal">-I</tt> and the IP 3108address of the Samba server (e.g., <tt class="literal">smbclient</tt> 3109<tt class="literal">-L</tt> <tt class="literal">server</tt> <tt class="literal">-I</tt> 3110<tt class="literal">192.168.236.86</tt>). This overrides the name lookup 3111and forces the packets to go to the IP address. If this works, there 3112was a mismatch.</p> 3113</li><li> 3114<p>Try with <tt class="literal">-I</tt> and the full domain name of the server 3115(e.g., <tt class="literal">smbclient</tt> <tt class="literal">-L</tt> 3116<tt class="literal">server</tt> <tt class="literal">-I</tt> 3117<tt class="literal">server.example.com</tt>). This tests the lookup of the 3118domain name, using whatever scheme the Samba server uses (e.g., DNS). 3119If it fails, you have a name service problem. You should reread the 3120earlier section, <a href="ch12.html#samba2-CHP-12-SECT-2.7">Section 12.2.7</a>, 3121after you finish troubleshooting the NetBIOS names.</p> 3122</li><li> 3123<p>Try with the <tt class="literal">-n</tt> (NetBIOS name) option, giving it 3124the name you expect to work (e.g., <tt class="literal">smbclient</tt> 3125<tt class="literal">-n</tt> <tt class="literal">server</tt> <tt class="literal">-L</tt> 3126<tt class="literal">server-12</tt>), but without overriding the IP address 3127through <tt class="literal">-I</tt>. If this works, the name you specified 3128with <tt class="literal">-n</tt> is the actual NetBIOS name of the server. 3129If you receive <tt class="literal">Get-Hostbyname</tt>: 3130<tt class="literal">Unknown</tt> <tt class="literal">host</tt> 3131<tt class="literal">SERVER</tt>, it's not the right server 3132yet.</p> 3133</li><li> 3134<p>If nothing is working so far, repeat the tests specifying 3135<tt class="literal">-U</tt> <em class="emphasis">username</em> and 3136<tt class="literal">-W</tt> <em class="emphasis">workgroup</em>, with the 3137username and workgroup in uppercase, to make sure 3138you're not being derailed by a user or workgroup 3139mismatch.</p> 3140</li><li> 3141<p>If still nothing works and you had evidence of a name service 3142problem, troubleshoot the name service (see the earlier section, 3143<a href="ch12.html#samba2-CHP-12-SECT-2.7">Section 12.2.7</a>) and then return to 3144the NetBIOS name service. <a name="INDEX-109"/><a name="INDEX-110"/></p> 3145</li></ul> 3146 3147</div> 3148 3149 3150</div> 3151 3152 3153 3154<div class="sect1"><a name="samba2-CHP-12-SECT-3"/> 3155 3156<h2 class="head1">Extra Resources</h2> 3157 3158<p>At some point during your work with Samba, you'll 3159want to turn to online or printed resources for news, updates, and 3160aid.</p> 3161 3162 3163<div class="sect2"><a name="samba2-CHP-12-SECT-3.1"/> 3164 3165<h3 class="head2">Documentation and FAQs</h3> 3166 3167<p>It's OK to read the <a name="INDEX-111"/><a name="INDEX-112"/>documentation. Really. Nobody can see you, 3168and we won't tell. In fact, Samba ships with a large 3169set of documentation files, and it is well worth the effort to at 3170least browse through them, either in the distribution directory on 3171your computer under <em class="filename">/docs</em> or online at the Samba 3172web site: <a href="http://www.samba.org">http://www.samba.org</a>. The most current 3173FAQ list, bug information, and distribution locations are located at 3174the web site, with links to all the Samba manual pages and HOWTOs.</p> 3175 3176 3177</div> 3178 3179 3180<div class="sect2"><a name="samba2-CHP-12-SECT-3.2"/> 3181 3182<h3 class="head2">Samba Newsgroups</h3> 3183 3184<p><a name="INDEX-113"/>Usenet 3185newsgroups have always been a great place to get advice on just about 3186any topic. In the past few years, though, this vast pool of knowledge 3187has developed something that has made it into an invaluable resource: 3188a memory. Archival and search sites such as the one at 3189<a name="INDEX-114"/>Google (<a href="http://groups.google.com/advanced_group_search">http://groups.google.com/advanced_group_search</a>) 3190have made sifting through years of valuable solutions as simple as a 3191few mouse clicks.</p> 3192 3193<p>The primary newsgroup for Samba is 3194<em class="emphasis">comp.protocols.smb</em><a name="INDEX-115"/>. This should always be your first 3195stop when there's a problem. More often than not, 3196spending 5 minutes researching an error here will save hours of 3197frustration while trying to debug something yourself.</p> 3198 3199<p>When searching a newsgroup, try to be as specific as possible, but 3200not too wordy. Searching on actual error messages is best. If you 3201don't find an answer immediately in the newsgroup, 3202resist the temptation to post a request for help until 3203you've done a bit more work on the problem. You 3204might find that the answer is in a FAQ or one of the many 3205documentation files that ship with Samba, or a solution might become 3206evident when you run one of Samba's diagnostic 3207tools. If nothing works, post a request in 3208<em class="emphasis">comp.protocols.smb</em>, and be as specific as 3209possible about what you have tried and what you are seeing. Include 3210any error messages that appear. It might be days before you receive 3211help, so be patient and keep trying things while you wait.</p> 3212 3213<a name="samba2-CHP-12-NOTE-161"/><blockquote class="note"><h4 class="objtitle">TIP</h4> 3214<p>Once you post a request for help, keep poking at the problem 3215yourself. Most of us have had the experience of posting a Usenet 3216article containing hundreds of lines of intricate detail, only to 3217solve the problem an hour later after the article has blazed its way 3218across several continents. The rule of thumb goes something like 3219this: the more folks who have read your request, the simpler the 3220solution. Usually this means that once everyone in the Unix community 3221has seen your article, the solution will be something simple such as, 3222"Plug the power cord into the wall 3223socket."</p> 3224</blockquote> 3225 3226 3227</div> 3228 3229 3230<div class="sect2"><a name="samba2-CHP-12-SECT-3.3"/> 3231 3232<h3 class="head2">Samba Mailing Lists</h3> 3233 3234<p>The following are <a name="INDEX-116"/>mailing lists for support with Samba. See 3235the Samba home page, <a href="http://www.samba.org/">http://www.samba.org/</a>, for 3236information on subscribing and unsubscribing to these mailing lists:</p> 3237 3238<dl> 3239<dt><b>samba@samba.org</b></dt> 3240<dd> 3241<p>This is the primary mailing list for general questions and discussion 3242regarding Samba.</p> 3243</dd> 3244 3245 3246 3247<dt><b>samba-announce@samba.org</b></dt> 3248<dd> 3249<p>This list is for receiving news regarding Samba, such as 3250announcements of new releases.</p> 3251</dd> 3252 3253 3254 3255<dt><b>samba-cvs@samba.org</b></dt> 3256<dd> 3257<p>By subscribing to this list, you can automatically receive a message 3258every time one of the Samba developers updates the Samba source code 3259in the CVS repository. You might want to do this if you are waiting 3260for a specific bug fix or feature to be applied. To avoid congesting 3261your email inbox, we suggest using the digest feature, which 3262consolidates messages into a smaller number of emails.</p> 3263</dd> 3264 3265 3266 3267<dt><b>samba-docs@samba.org</b></dt> 3268<dd> 3269<p>This list is for discussing Samba documentation.</p> 3270</dd> 3271 3272 3273 3274<dt><b>samba-vms@samba.org</b></dt> 3275<dd> 3276<p>This mailing list is for people who are running Samba on the VMS 3277operating system.</p> 3278</dd> 3279 3280 3281 3282<dt><b>samba-binaries@samba.org</b></dt> 3283<dd> 3284<p>This is a list for developers to use when discussing precompiled 3285Samba distributions.</p> 3286</dd> 3287 3288 3289 3290<dt><b>samba-technical@samba.org</b></dt> 3291<dd> 3292<p>This mailing list is for developer discussion of the Samba code.</p> 3293</dd> 3294 3295</dl> 3296 3297<p>Searchable versions of the Samba mailing list archives can be found 3298at <a href="http://marc.theaimsgroup.com">http://marc.theaimsgroup.com</a>.</p> 3299 3300<p>When posting messages to the Samba mailing lists, keep in mind that 3301you are sending your message to a large audience. The notes in the 3302previous section regarding Usenet postings also apply here. A 3303well-formulated question or comment is more likely to be answered, 3304and a poorly conceived message is <em class="emphasis">very</em> likely to 3305be ignored!</p> 3306 3307 3308</div> 3309 3310 3311<div class="sect2"><a name="samba2-CHP-12-SECT-3.4"/> 3312 3313<h3 class="head2">Further Reading</h3> 3314 3315<ol><li> 3316<p>Hunt, Craig. <em class="emphasis">TCP/IP Network Administration</em>, 3317Third Edition. Sebastopol, CA: O'Reilly 3318& Associates, 1997.</p> 3319</li> 3320<li> 3321<p>Hunt, Craig, and Robert Bruce Thompson. <em class="emphasis">Windows NT TCP/IP 3322Network Administration</em>. Sebastopol, CA: 3323O'Reilly & Associates, 1998.</p> 3324</li> 3325<li> 3326<p>Albitz, Paul, and Cricket Liu. <em class="emphasis">DNS and Bind</em>, 3327Fourth Edition. Sebastopol, CA: O'Reilly 3328& Associates, 1998.</p> 3329</li> 3330<li> 3331<p>Stern, Hal. <em class="emphasis">Managing NFS and NIS</em>, Second 3332Edition. Sebastopol, CA: O'Reilly & Associates, 33331991.<a name="INDEX-117"/></p> 3334</li></ol> 3335 3336</div> 3337 3338 3339</div> 3340 3341<hr/><h4 class="head4"><a href="toc.html">TOC</a></h4></body></html> 3342