This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.
[sfrench/samba-autobuild/.git] / docs / htmldocs / using_samba / ch09_01.html
1 <HTML>
2 <HEAD>
3 <TITLE>
4 [Chapter 9] Troubleshooting Samba</title><META NAME="DC.title" CONTENT=""><META NAME="DC.creator" CONTENT=""><META NAME="DC.publisher" CONTENT="O'Reilly &amp; Associates, Inc."><META NAME="DC.date" CONTENT="1999-11-05T21:36:14Z"><META NAME="DC.type" CONTENT="Text.Monograph"><META NAME="DC.format" CONTENT="text/html" SCHEME="MIME"><META NAME="DC.source" CONTENT="" SCHEME="ISBN"><META NAME="DC.language" CONTENT="en-US"><META NAME="generator" CONTENT="Jade 1.1/O'Reilly DocBook 3.0 to HTML 4.0"></head>
5 <BODY BGCOLOR="#FFFFFF" TEXT="#000000" link="#990000" vlink="#0000CC">
6 <table BORDER="0" CELLPADDING="0" CELLSPACING="0" width="90%">
7 <tr>
8 <td width="25%" valign="TOP">
9 <img hspace=10 vspace=10 src="gifs/samba.s.gif" 
10 alt="Using Samba" align=left valign=top border=0>
11 </td>
12 <td height="105" valign="TOP">
13 <br>
14 <H2>Using Samba</H2>
15 <font size="-1">
16 Robert Eckstein, David Collier-Brown, Peter Kelly
17 <br>1st Edition November 1999
18 <br>1-56592-449-5, Order Number: 4495
19 <br>416 pages, $34.95
20 </font>
21 <p> <a href="http://www.oreilly.com/catalog/samba/">Buy the hardcopy</a>
22 <p><a href="index.html">Table of Contents</a>
23 </td>
24 </tr>
25 </table>
26 <hr size=1 noshade>
27 <!--sample chapter begins -->
28
29 <center>
30 <DIV CLASS="htmlnav">
31 <TABLE WIDTH="515" BORDER="0" CELLSPACING="0" CELLPADDING="0">
32 <TR>
33 <TD ALIGN="LEFT" VALIGN="TOP" WIDTH="172">
34 <A CLASS="sect1" HREF="ch08_07.html" TITLE="8.7 Backups with smbtar">
35 <IMG SRC="gifs/txtpreva.gif" ALT="Previous: 8.7 Backups with smbtar" BORDER="0"></a></td><TD ALIGN="CENTER" VALIGN="TOP" WIDTH="171">
36 <B>
37 <FONT FACE="ARIEL,HELVETICA,HELV,SANSERIF" SIZE="-1">
38 Chapter 9</font></b></td><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="172">
39 <A CLASS="sect1" HREF="ch09_02.html" TITLE="9.2 The Fault Tree">
40 <IMG SRC="gifs/txtnexta.gif" ALT="Next: 9.2 The Fault Tree" BORDER="0"></a></td></tr></table>&nbsp;<hr noshade size=1></center>
41 </div>
42 <blockquote>
43 <div class="samplechapter">
44 <H1 CLASS="chapter">
45 <A CLASS="title" NAME="ch09-80975">
46 9. Troubleshooting Samba</a></h1><DIV CLASS="htmltoc">
47 <P>
48 <B>
49 Contents:</b><br>
50 <A CLASS="sect1" HREF="#ch09-36385" TITLE="9.1 The Tool Bag">
51 The Tool Bag</a><br>
52 <A CLASS="sect1" HREF="ch09_02.html" TITLE="9.2 The Fault Tree">
53 The Fault Tree</a><br>
54 <A CLASS="sect1" HREF="ch09_03.html" TITLE="9.3 Extra Resources">
55 Extra Resources</a></p><P>
56 </p></div><P CLASS="para">Samba is extremely robust. Once you've got everything set up the way you want, you'll probably forget that it is running. When trouble occurs, it's typically during installation or when you're trying to add something new to the server. Fortunately, there are a wide variety of resources that you can use to diagnose these troubles. While we can't describe in detail the solution to every problem that you might encounter, you should be able to get a good start at a resolution by following the advice given in this chapter.</p><P CLASS="para">
57 The first section of the chapter lists the tool bag, a collection of tools available for troubleshooting Samba; the second section is a detailed how-to, and the last section lists extra resources you may need to track down particularly stubborn problems.</p><DIV CLASS="sect1">
58 <H2 CLASS="sect1">
59 <A CLASS="title" NAME="s1"></a>
60 <A CLASS="title" NAME="ch09-36385">
61 9.1 The Tool Bag</a></h2><P CLASS="para">Sometimes Unix seems to be made up of a handful of applications and tools. There are tools to troubleshoot tools. And of course, there are several ways to accomplish the same task. When you are trying to solve a problem related to Samba, a good plan of attack is to check the following:</p><OL CLASS="orderedlist">
62 <LI CLASS="listitem">
63 <P CLASS="para">
64 <A CLASS="listitem" NAME="ch09-pgfId-944982">
65 </a>Samba logs </p></li><LI CLASS="listitem">
66 <P CLASS="para">
67 <A CLASS="listitem" NAME="ch09-pgfId-944983">
68 </a>Fault tree </p></li><LI CLASS="listitem">
69 <P CLASS="para">
70 <A CLASS="listitem" NAME="ch09-pgfId-944984">
71 </a>Unix utilities </p></li><LI CLASS="listitem">
72 <P CLASS="para">
73 <A CLASS="listitem" NAME="ch09-pgfId-944985">
74 </a>Samba test utilities </p></li><LI CLASS="listitem">
75 <P CLASS="para">
76 <A CLASS="listitem" NAME="ch09-pgfId-944986">
77 </a>Documentation and FAQs </p></li><LI CLASS="listitem">
78 <P CLASS="para">
79 <A CLASS="listitem" NAME="ch09-pgfId-944987">
80 </a>Searchable archives </p></li><LI CLASS="listitem">
81 <P CLASS="para">
82 <A CLASS="listitem" NAME="ch09-pgfId-944988">
83 </a>Samba newsgroups</p></li></ol><P CLASS="para">
84 Let's go over each of these one by one in the following sections.</p><DIV CLASS="sect2">
85 <H3 CLASS="sect2">
86 <A CLASS="title" NAME="ch09-pgfId-950956">
87 9.1.1 Samba Logs</a></h3><P CLASS="para">Your first line of attack should always be to check the log files. The Samba log files can help diagnose the vast majority of the problems that beginning to intermediate Samba administrators are likely to face. Samba is quite flexible when it comes to logging. You can set up the server to log as little or as much as you want. Substitution variables that allow you to isolate individual logs for each machine, share, or combination thereof.</p><P CLASS="para">
88 By default, logs are placed in <CODE CLASS="replaceable">
89 <I>
90 samba_directory</i></code><EM CLASS="emphasis">
91 /var/smbd.log</em> and <CODE CLASS="replaceable">
92 <I>
93 samba_directory</i></code><EM CLASS="emphasis">
94 /var/nmbd.log</em>, where <CODE CLASS="literal">
95 samba_directory</code> is the location where Samba was installed (typically, <I CLASS="filename">
96 /usr/local/samba</i>). As we mentioned in <a href=ch04_01.html><b>Chapter 4, <CITE CLASS="chapter">Disk Shares</cite></b></a>, you can override the location and name using the <CODE CLASS="literal">
97 log</code> <CODE CLASS="literal">
98 file</code> configuration option in <I CLASS="filename">
99 smb.conf</i>. This option accepts all of the substitution variables mentioned in <a href="ch02_01.html"><b>Chapter 2, <CITE CLASS="chapter">Installing Samba on a Unix System</cite></b></a>, so you could easily have the server keep a separate log for each connecting client by specifying the following in the <CODE CLASS="literal">
100 [global]</code> section of <I CLASS="filename">
101 smb.conf</i>:</p><PRE CLASS="programlisting">
102 log file = %m.log</pre><P CLASS="para">
103 Alternatively, you can specify a log directory to use with the <CODE CLASS="literal">
104 -l</code> flag on the command line. For example:</p><PRE CLASS="programlisting">
105 smbd -l /usr/local/var/samba</pre><P CLASS="para">
106 Another useful trick is to have the server keep a log for each service (share) that is offered, especially if you suspect a particular share is causing trouble. Use the <CODE CLASS="literal">
107 %S</code> variable to set this up in the <CODE CLASS="literal">
108 [global]</code> section of the configuration file:</p><PRE CLASS="programlisting">
109 log file = %S.log</pre><DIV CLASS="sect3">
110 <H4 CLASS="sect3">
111 <A CLASS="title" NAME="ch09-28969">
112 9.1.1.1 Log levels</a></h4><P CLASS="para">The level of logging that Samba uses can be set in the <I CLASS="filename">
113 smb.conf</i> file using the global <CODE CLASS="literal">
114 log</code> <CODE CLASS="literal">
115 level</code> or <CODE CLASS="literal">
116 debug</code> <CODE CLASS="literal">
117 level</code> option; they are equivalent. The logging level is an integer which ranges from 0 (no logging), and increases the logging to voluminous by <CODE CLASS="literal">
118 log</code> <CODE CLASS="literal">
119 level</code> <CODE CLASS="literal">
120 =</code> <CODE CLASS="literal">
121 3</code>. For example, let's assume that we are going to use a Windows client to browse a directory on a Samba server. For a small amount of log information, you can use <CODE CLASS="literal">
122 log</code> <CODE CLASS="literal">
123 level</code> <CODE CLASS="literal">
124 =</code> <CODE CLASS="literal">
125 1</code>, which instructs Samba to show only cursory information, in this case only the connection itself: </p><PRE CLASS="programlisting">
126 105/25/98 22:02:11 server (192.168.236.86) connect to service public as user pcguest (uid=503,gid=100) (pid 3377) </pre><P CLASS="para">
127 Higher debug levels produce more detailed information. Usually you won't need any more than level 3; this is more than adequate for most Samba administrators. Levels above 3 are for use by the developers and dump enormous amounts of cryptic information.</p><P CLASS="para">
128 Here is example output at levels 2 and 3 for the same operation. Don't worry if you don't understand the intricacies of an SMB connection; the point is simply to show you what types of information are shown at the different logging levels: </p><PRE CLASS="programlisting">
129  /* Level 2 */
130 Got SIGHUP
131 Processing section &quot;[homes]&quot;
132 Processing section &quot;[public]&quot;
133 Processing section &quot;[temp]&quot;
134 Allowed connection from 192.168.236.86 (192.168.236.86) to IPC$
135 Allowed connection from 192.168.236.86 (192.168.236.86) to IPC/
136
137
138 /* Level 3 */
139 05/25/98 22:15:09 Transaction 63 of length 67
140 switch message SMBtconX (pid 3377)
141 Allowed connection from 192.168.236.86 (192.168.236.86) to IPC$
142 ACCEPTED: guest account and guest ok
143 found free connection number 105
144 Connect path is /tmp
145 chdir to /tmp
146 chdir to /
147 05/25/98 22:15:09 server (192.168.236.86) connect to service IPC$ as user pcguest (uid=503,gid=100) (pid 3377)
148 05/25/98 22:15:09 tconX service=ipc$ user=pcguest cnum=105
149 05/25/98 22:15:09 Transaction 64 of length 99
150 switch message SMBtrans (pid 3377)
151 chdir to /tmp
152 trans &lt;\PIPE\LANMAN&gt; data=0 params=19 setup=0
153 Got API command 0 of form &lt;WrLeh&gt; &lt;B13BWz&gt; (tdscnt=0,tpscnt=19,mdrcnt=4096,mprcnt=8)
154 Doing RNetShareEnum
155 RNetShareEnum gave 4 entries of 4 (1 4096 126 4096)
156 05/25/98 22:15:11 Transaction 65 of length 99
157 switch message SMBtrans (pid 3377)
158 chdir to /
159 chdir to /tmp
160 trans &lt;\PIPE\LANMAN&gt; data=0 params=19 setup=0
161 Got API command 0 of form &lt;WrLeh&gt; &lt;B13BWz&gt; (tdscnt=0,tpscnt=19,mdrcnt=4096,mprcnt=8)
162 Doing RNetShareEnum
163 RNetShareEnum gave 4 entries of 4 (1 4096 126 4096)
164 05/25/98 22:15:11 Transaction 66 of length 95
165 switch message SMBtrans2 (pid 3377)
166 chdir to /
167 chdir to /pcdisk/public
168 call_trans2findfirst: dirtype = 0, maxentries = 6, close_after_first=0, close_if_end = 0 requires_resume_key = 0 level = 260, max_data_bytes = 2432
169 unix_clean_name [./DESKTOP.INI]
170 unix_clean_name [desktop.ini]
171 unix_clean_name [./]
172 creating new dirptr 1 for path ./, expect_close = 1
173 05/25/98 22:15:11 Transaction 67 of length 53
174 switch message SMBgetatr (pid 3377)
175 chdir to /
176
177 [...]</pre><P CLASS="para">
178 We cut off this listing after the first packet because it runs on for many pages. However, you should be aware that log levels above 3 will quickly fill your disk with megabytes of excruciating detail concerning Samba internal operations. Log level 3 is extremely useful for following exactly what the server is doing, and most of the time it will be obvious where an error is occurring by glancing through the log file.</p><P CLASS="para">
179 A word of warning: using a high log level (3 or above) will <EM CLASS="emphasis">
180 seriously</em> slow down the Samba server. Remember that every log message generated causes a write to disk (an inherently slow operation) and log levels greater than 2 produce massive amounts of data. Essentially, you should turn on logging level 3 only when you're actively tracking a problem in the Samba server.</p></div><DIV CLASS="sect3">
181 <H4 CLASS="sect3">
182 <A CLASS="title" NAME="ch09-pgfId-946537">9.1.1.2 Activating and deactivating logging</a></h4><P CLASS="para">To turn logging on and off, set the appropriate level in the <CODE CLASS="literal">
183 [global]</code> section of <I CLASS="filename">
184 smb.conf</i>. Then, you can either restart Samba, or force the current daemon to reprocess the configuration file. You also can send the <EM CLASS="emphasis">
185 smbd</em> process a SIGUSR1 signal to increase its log level by one while it's running, and a SIGUSR2 signal to decrease it by one:</p><PRE CLASS="programlisting">
186 # Increase the logging level by 1
187 kill -SIGUSR1 1234
188
189 # Decrease the logging level by 1
190 kill -SIGUSR2 1234</pre></div><DIV CLASS="sect3">
191 <H4 CLASS="sect3">
192 <A CLASS="title" NAME="ch09-34448">
193 9.1.1.3 Logging by individual client machines or users</a></h4><P CLASS="para">An effective way to diagnose problems without hampering other users is to assign different log levels for different machines in <CODE CLASS="literal">
194 [global]</code> section of the <I CLASS="filename">
195 smb.conf</i> file. We can do this by building on the strategy we presented earlier:</p><PRE CLASS="programlisting">
196 [global]
197         log level = 0
198         log file = /usr/local/samba/lib/log.%m
199         include = /usr/local/samba/lib/smb.conf.%m</pre><P CLASS="para">
200 These options instruct Samba to use unique configuration and log files for each client that connects. Now all you have to do is create an <I CLASS="filename">
201 smb.conf</i> file for a specific client machine with a <CODE CLASS="literal">
202 log</code> <CODE CLASS="literal">
203 level</code> <CODE CLASS="literal">
204 =</code> <CODE CLASS="literal">
205 3</code> entry in it (the others will pick up the default log level of 0) and use that log file to track down the problem.</p><P CLASS="para">
206 Similarly, if only particular users are experiencing a problem, and it travels from machine to machine with them, you can isolate logging to a specific user by adding the following to the <I CLASS="filename">
207 smb.conf</i> file:</p><PRE CLASS="programlisting">
208 [global]
209         log level = 0
210         log file = /usr/local/samba/lib/log.%u
211         include = /usr/local/samba/lib/smb.conf.%u</pre><P CLASS="para">
212 Then you can create a unique <I CLASS="filename">
213 smb.conf</i> file for each user (e.g., <I CLASS="filename">
214 /usr/local/samba/lib/smb.conf.tim</i>) files containing the configuration option <CODE CLASS="literal">
215 log</code> <CODE CLASS="literal">
216 level</code> <CODE CLASS="literal">
217 =</code> <CODE CLASS="literal">
218 3</code> and only those users will get more detailed logging.</p></div></div><DIV CLASS="sect2">
219 <H3 CLASS="sect2">
220 <A CLASS="title" NAME="ch09-pgfId-945079">9.1.2 Samba Test Utilities</a></h3><P CLASS="para">A rigorous set of tests that exercise the major parts of Samba are described in various files in the <EM CLASS="emphasis">
221 /docs/textdocs</em> directory of the Samba distribution kit, starting with <EM CLASS="emphasis">
222 DIAGNOSIS.TXT.</em> The fault tree in this chapter is a more detailed version of the basic tests suggested by the Samba team, but covers only installation and reconfiguration diagnosis, like <EM CLASS="emphasis">
223 DIAGNOSIS.TXT.</em> The other files in the <EM CLASS="emphasis">
224 /docs</em> subdirectoryies address specific problems (such as Windows NT clients) and instruct you how to troubleshoot items not included in this book. If the fault tree doesn't suffice, be sure to look at <EM CLASS="emphasis">
225 DIAGNOSIS.TXT</em> and its friends.</p></div><DIV CLASS="sect2">
226 <H3 CLASS="sect2">
227 <A CLASS="title" NAME="ch09-pgfId-945083">
228 9.1.3 Unix Utilities</a></h3><P CLASS="para">Sometimes it's useful to use a tool outside of the Samba suite to examine what's happening inside the server. Unix has always been a "kitchen-sink" operating system. Two diagnostic tools can be of particular help in debugging Samba troubles: <EM CLASS="emphasis">
229 trace</em> and <EM CLASS="emphasis">
230 tcpdump</em>.</p><DIV CLASS="sect3">
231 <H4 CLASS="sect3">
232 <A CLASS="title" NAME="ch09-pgfId-945085">
233 9.1.3.1 Using trace</a></h4><P CLASS="para">
234 The <EM CLASS="emphasis">
235 trace</em> command masquerades under several different names, depending on the operating system that you are using. On Linux it will be <EM CLASS="emphasis">
236 strace</em>, on Solaris you'll use <EM CLASS="emphasis">
237 truss</em>, and SGI will have <EM CLASS="emphasis">
238 padc</em> and <EM CLASS="emphasis">
239 par</em>. All have essentially the same function, which is to display each operating system function call as it is executed. This allows you to follow the execution of a program, such as the Samba server, and will often pinpoint the exact call that is causing the difficulty.</p><P CLASS="para">
240 One problem that <EM CLASS="emphasis">
241 trace</em> can highlight is the location of an incorrect version of a dynamically linked library. This can happen if you've downloaded prebuilt binaries of Samba. You'll typically see the offending call at the end of the <EM CLASS="emphasis">
242 trace</em>, just before the program terminates.</p><P CLASS="para">
243 A sample <CODE CLASS="literal">
244 strace</code> output for the Linux operating system follows. This is a small section of a larger file created during the opening of a directory on the Samba server. Each line is a system-call name, and includes its parameters and the return value. If there was an error, the error value (e.g., <CODE CLASS="literal">
245 ENOENT</code>) and its explanation are also shown. You can look up the parameter types and the errors that can occur in the appropriate <CODE CLASS="literal">
246 trace</code> manual page for the operating system that you are using.</p><PRE CLASS="programlisting">
247 chdir(&quot;/pcdisk/public&quot;)                 = 0
248 stat(&quot;mini/desktop.ini&quot;, 0xbffff7ec)    = -1 ENOENT (No such file or directory)
249 stat(&quot;mini&quot;, {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
250 stat(&quot;mini/desktop.ini&quot;, 0xbffff7ec)    = -1 ENOENT (No such file or directory)
251 open(&quot;mini&quot;, O_RDONLY)                  = 5
252 fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
253 fstat(5, {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
254 lseek(5, 0, SEEK_CUR)                   = 0
255 SYS_141(0x5, 0xbfffdbbc, 0xedc, 0xbfffdbbc, 0x80ba708) = 196
256 lseek(5, 0, SEEK_CUR)                   = 1024
257 SYS_141(0x5, 0xbfffdbbc, 0xedc, 0xbfffdbbc, 0x80ba708) = 0
258 close(5)                                = 0
259 stat(&quot;mini/desktop.ini&quot;, 0xbffff86c)    = -1 ENOENT (No such file or directory)
260 write(3, &quot;\0\0\0#\377SMB\10\1\0\2\0\200\1\0&quot;..., 39) = 39
261 SYS_142(0xff, 0xbffffc3c, 0, 0, 0xbffffc08) = 1
262 read(3, &quot;\0\0\0?&quot;, 4)                   = 4
263 read(3, &quot;\377SMBu\0\0\0\0\0\0\0\0\0\0\0\0&quot;..., 63) = 63
264 time(NULL)                              = 896143871</pre><P CLASS="para">
265 This example shows several <CODE CLASS="literal">
266 stat</code> calls failing to find the files they were expecting. You don't have to be a expert to see that the file <EM CLASS="emphasis">
267 desktop.ini</em> is missing from that directory. In fact, many difficult problems can be identified by looking for obvious, repeatable errors with <EM CLASS="emphasis">
268 trace</em>. Often, you need not look farther than the last message before a crash.</p></div><DIV CLASS="sect3">
269 <H4 CLASS="sect3">
270 <A CLASS="title" NAME="ch09-pgfId-945114">
271 9.1.3.2 Using tcpdump</a></h4><P CLASS="para">
272 The <EM CLASS="emphasis">
273 tcpdump</em> program, written by Van Jacobson, Craig Leres, and Steven McCanne, and extended by Andrew Tridgell, allows you to monitor network traffic in real time. A variety of output formats are available and you can filter the output to look at only a particular type of traffic. The <EM CLASS="emphasis">
274 tcpdump</em> program lets you examine all conversations between client and server, including SMB and NMB broadcast messages. While its troubleshooting capabilities lie mainly at the OSI network layer, you can still use its output to get a general idea of what the server and client are attempting to accomplish.</p><P CLASS="para">
275 A sample <EM CLASS="emphasis">
276 tcpdump</em> log follows. In this instance, the client has requested a directory listing and the server has responded appropriately, giving the directory names <CODE CLASS="literal">
277 homes</code>, <CODE CLASS="literal">
278 public</code>, <CODE CLASS="literal">
279 IPC$</code>, and <CODE CLASS="literal">
280 temp</code> (we've added a few explanations on the right):</p><PRE CLASS="programlisting">$<CODE CLASS="userinput"><B> tcpdump -v -s 255 -i eth0 port not telnet</b></code>
281 SMB PACKET: SMBtrans (REQUEST)                          <CODE CLASS="replaceable">
282 <I>
283 Request packet</i></code>
284 SMB Command   =  0x25                                 <CODE CLASS="replaceable">
285 <I>
286 Request was ls or dir</i></code>.
287
288 [000] 01 00 00 10                                     ....
289
290
291 &gt;&gt;&gt; NBT Packet                                                                 <CODE CLASS="replaceable">
292 <I>
293 Outer frame of SMB packe</i></code>t
294 NBT Session Packet
295 Flags=0x0
296 Length=226
297 [lines skipped]
298                          
299 SMB PACKET: SMBtrans (REPLY)                               <CODE CLASS="replaceable">
300 <I>
301 Beginning of a reply to  request </i></code>
302 SMB Command   =  0x25                                                     <CODE CLASS="replaceable">
303 <I>
304 Command was an ls or dir</i></code>
305 Error class   =  0x0                     
306 Error code    =  0                                                                    <CODE CLASS="replaceable">
307 <I>
308 No errors</i></code>
309 Flags1        =  0x80
310 Flags2        =  0x1
311 Tree ID       =  105
312 Proc ID       =  6075
313 UID           =  100
314 MID           =  30337
315 Word Count    =  10
316 TotParamCnt=8 
317 TotDataCnt=163 
318 Res1=0
319 ParamCnt=8 
320 ParamOff=55 
321 Res2=0 
322 DataCnt=163 
323 DataOff=63 
324 Res3=0
325 Lsetup=0
326 Param Data: (8 bytes)
327 [000] 00 00 00 00 05 00 05 00                           ........ 
328
329 Data Data: (135 bytes)                                                        <CODE CLASS="replaceable">
330 <I>
331                         Actual directory contents:</i></code>
332 [000] 68 6F 6D 65 73 00 00 00  00 00 00 00 00 00 00 00  homes... ........
333 [010] 64 00 00 00 70 75 62 6C  69 63 00 00 00 00 00 00  d...publ ic......
334 [020] 00 00 00 00 75 00 00 00  74 65 6D 70 00 00 00 00  ....u... temp....
335 [030] 00 00 00 00 00 00 00 00  76 00 00 00 49 50 43 24  ........ v...IPC$
336 [040] 00 00 00 00 00 00 00 00  00 00 03 00 77 00 00 00  ........ ....w...
337 [050] 64 6F 6E 68 61 6D 00 00  00 00 00 00 00 00 00 00  donham.. ........
338 [060] 92 00 00 00 48 6F 6D 65  20 44 69 72 65 63 74 6F  ....Home  Directo
339 [070] 72 69 65 73 00 00 00 49  50 43 20 53 65 72 76 69  ries...I PC Servi
340 [080] 63 65 20 28 53 61 6D                              ce (Sam</pre><P CLASS="para">
341 This is more of the same debugging session as with the 
342 <i>trace</i> command; the listing of a directory. The options we used were <CODE CLASS="literal">
343 -v</code> (verbose), <CODE CLASS="literal">
344 -i</code> <CODE CLASS="literal">
345 eth0</code> to tell <EM CLASS="emphasis">
346 tcpdump</em> the interface to listen on (an Ethernet port), and <CODE CLASS="literal">
347 -s</code> <CODE CLASS="literal">
348 255</code> to tell it to save the first 255 bytes of each packet instead of the default: the first 68. The option <CODE CLASS="literal">
349 port</code> <CODE CLASS="literal">
350 not</code> <CODE CLASS="literal">
351 telnet</code> is used to avoid screens of telnet traffic, since we were logged in to the server remotely. The <EM CLASS="emphasis">
352 tcpdump</em> program actually has quite a number of options to filter just the traffic you want to look at. If you've used <EM CLASS="emphasis">
353 snoop</em> or <EM CLASS="emphasis">
354 etherdump</em>, they'll look vaguely familiar.</p><P CLASS="para">
355 You can download the modified <EM CLASS="emphasis">
356 tcpdump</em> from the Samba FTP server at <I CLASS="filename">
357 <a href="ftp://samba.anu.edu.au/pub/samba/tcpdump-smb">ftp://samba.anu.edu.au/pub/samba/tcpdump-smb</i></a>. Other versions don't include support for the SMB protocol; if you don't see output such as that shown in the example, you'll need to<EM CLASS="emphasis">
358 </em> use the SMB-enabled version.</p></div></div></div></div></blockquote>
359 <div>
360 <center>
361 <hr noshade size=1><TABLE WIDTH="515" BORDER="0" CELLSPACING="0" CELLPADDING="0">
362 <TR>
363 <TD ALIGN="LEFT" VALIGN="TOP" WIDTH="172">
364 <A CLASS="sect1" HREF="ch08_07.html" TITLE="8.7 Backups with smbtar">
365 <IMG SRC="gifs/txtpreva.gif" ALT="Previous: 8.7 Backups with smbtar" BORDER="0"></a></td><TD ALIGN="CENTER" VALIGN="TOP" WIDTH="171">
366 <A CLASS="book" HREF="index.html" TITLE="">
367 <IMG SRC="gifs/txthome.gif" ALT="" BORDER="0"></a></td><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="172">
368 <A CLASS="sect1" HREF="ch09_02.html" TITLE="9.2 The Fault Tree">
369 <IMG SRC="gifs/txtnexta.gif" ALT="Next: 9.2 The Fault Tree" BORDER="0"></a></td></tr><TR>
370 <TD ALIGN="LEFT" VALIGN="TOP" WIDTH="172">8.7 Backups with smbtar</td><TD ALIGN="CENTER" VALIGN="TOP" WIDTH="171">
371 <A CLASS="index" HREF="inx.html" TITLE="Book Index">
372 <IMG SRC="gifs/index.gif" ALT="Book Index" BORDER="0"></a></td><TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="172">
373 9.2 The Fault Tree</td></tr></table><hr noshade size=1></center>
374 </div>
375
376 <!-- End of sample chapter -->
377 <CENTER>
378 <FONT SIZE="1" FACE="Verdana, Arial, Helvetica">
379 <A HREF="http://www.oreilly.com/">
380 <B>O'Reilly Home</B></A> <B> | </B>
381 <A HREF="http://www.oreilly.com/sales/bookstores">
382 <B>O'Reilly Bookstores</B></A> <B> | </B>
383 <A HREF="http://www.oreilly.com/order_new/">
384 <B>How to Order</B></A> <B> | </B>
385 <A HREF="http://www.oreilly.com/oreilly/contact.html">
386 <B>O'Reilly Contacts<BR></B></A>
387 <A HREF="http://www.oreilly.com/international/">
388 <B>International</B></A> <B> | </B>
389 <A HREF="http://www.oreilly.com/oreilly/about.html">
390 <B>About O'Reilly</B></A> <B> | </B>
391 <A HREF="http://www.oreilly.com/affiliates.html">
392 <B>Affiliated Companies</B></A><p>
393 <EM>&copy; 1999, O'Reilly &amp; Associates, Inc.</EM>
394 </FONT>
395 </CENTER>
396 </BODY>
397 </html>