This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.
[samba.git] / docs / docbook / projdoc / Problems.xml
1 <chapter id="problems">
2
3 <chapterinfo>
4         &author.jerry;
5         &author.jelmer;
6         &author.dbannon;
7         &author.danshearer;
8         <pubdate>8 Apr 2003</pubdate>
9 </chapterinfo>
10
11 <title>Analyzing and Solving Samba Problems</title>
12
13 <para>
14 There are many sources of information available in the form 
15 of mailing lists, RFCs and documentation. The documentation that comes
16 with the Samba distribution contains good explanations of 
17 general SMB topics such as browsing.</para> 
18         
19 <sect1>
20 <title>Diagnostics Tools</title>
21
22 <para>With SMB networking, it is often not immediately clear what 
23 the cause is of a certain problem. Samba itself provides rather 
24 useful information, but in some cases you might have to fall back 
25 to using a <emphasis>sniffer</emphasis>. A sniffer is a program that 
26 listens on your LAN, analyzes the data sent on it and displays it 
27 on the screen.</para>
28
29 <sect2>
30 <title>Debugging with Samba Itself</title>
31
32 <para>
33 One of the best diagnostic tools for debugging problems is Samba itself. 
34 You can use the <option>-d option</option> for both &smbd; and &nmbd; to specify the 
35 <smbconfoption><name>debug level</name></smbconfoption> at which to run. 
36 See the man pages for <command>smbd, nmbd</command>  and 
37 &smb.conf; for more information regarding debugging options. The debug 
38 level can range from 1 (the default) to 10 (100 for debugging passwords).
39 </para>
40         
41 <para>
42 Another helpful method of debugging is to compile Samba using the 
43 <command>gcc -g </command> flag. This will include debug information in the binaries and
44 allow you to attach gdb to the running <command>smbd/nmbd</command> process. 
45 To attach <command>gdb</command> to an <command>smbd</command> 
46 process for an NT workstation, first get the workstation to make the 
47 connection. Pressing ctrl-alt-delete and going down to the domain box 
48 is sufficient (at least, the first time you join the domain) to 
49 generate a <parameter>LsaEnumTrustedDomains</parameter>. Thereafter, the workstation 
50 maintains an open connection and there will be an smbd 
51 process running (assuming that you haven't set a really short smbd 
52 idle timeout). So, in between pressing <command>ctrl-alt-delete</command> and actually 
53 typing in your password, you can attach <command>gdb</command> and continue.
54 </para>
55
56 <para>
57 Some useful Samba commands worth investigating are:
58 </para>
59         
60 <screen>
61 &prompt;<userinput>testparm | more</userinput>
62 &prompt;<userinput>smbclient -L //{netbios name of server}</userinput>
63 </screen>
64
65 </sect2>
66
67 <sect2>
68         <title>Tcpdump</title>
69   
70 <para>
71 <ulink url="http://www.tcpdump.org/">Tcpdump</ulink> was the first 
72 UNIX sniffer with SMB support. It is a command-line utility and 
73 now, its SMB support is somewhat lagging that of <command>ethereal</command> 
74 and <command>tethereal</command>.
75 </para>
76
77 </sect2>
78
79 <sect2>
80         <title>Ethereal</title>
81
82 <para>
83 <ulink url="http://www.ethereal.com/">Ethereal</ulink> is a graphical 
84 sniffer, available for both UNIX (Gtk) and Windows. Ethereal's 
85 SMB support is quite good.</para>
86
87 <para>For details on the use of <command>ethereal</command>, read the well-written 
88 Ethereal User Guide.</para>
89
90 <image id="ethereal1"><imagefile>ethereal1</imagefile><imagedescription>Starting a capture.</imagedescription></image>
91
92 <para>
93 Listen for data on ports 137, 138, 139, and 445. For example, use the filter <userinput>port 137, port 138, port 139, or port 445</userinput> as seen in <link linkend="ethereal1"/>.</para>
94
95 <para>A console version of ethereal is available as well and is called 
96 <command>tethereal</command>.</para>
97
98 <image id="ethereal2"><imagefile>ethereal2</imagefile><imagedescription>Main ethereal data window.</imagedescription></image>
99
100 </sect2>
101
102 <sect2>
103 <title>The Windows Network Monitor</title>
104         
105 <para>
106 For tracing things on Microsoft Windows NT, Network Monitor 
107 (aka Netmon) is available on Microsoft Developer Network CDs, 
108 the Windows NT Server install CD and the SMS CDs. The version of 
109 Netmon that ships with SMS allows for dumping packets between any two 
110 computers (i.e., placing the network interface in promiscuous mode). 
111 The version on the NT Server install CD will only allow monitoring 
112 of network traffic directed to the local NT box and broadcasts on the 
113 local subnet. Be aware that Ethereal can read and write Netmon 
114 formatted files.
115 </para>
116
117 <sect3>
118 <title>Installing Network Monitor on an NT Workstation</title>
119
120 <para>
121 Installing Netmon on an NT workstation requires a couple 
122 of steps. The following are instructions for installing Netmon V4.00.349, which comes 
123 with Microsoft Windows NT Server 4.0, on Microsoft Windows NT 
124 Workstation 4.0. The process should be similar for other versions of 
125 Windows NT version of Netmon. You will need both the Microsoft Windows 
126 NT Server 4.0 Install CD and the Workstation 4.0 Install CD.
127 </para> 
128
129 <para>
130 Initially you will need to install <application>Network Monitor Tools and Agent</application>
131 on the NT Server to do this: 
132 </para>
133
134 <itemizedlist>
135         <listitem><para>Go to <guibutton>Start</guibutton> -> <guibutton>Settings</guibutton> -> <guibutton>Control Panel</guibutton> -> 
136         <guibutton>Network</guibutton> -> <guibutton>Services</guibutton> -> <guibutton>Add</guibutton>.</para></listitem>
137         
138         <listitem><para>Select the <guilabel>Network Monitor Tools and Agent</guilabel> and click on <guibutton>OK</guibutton>.</para></listitem> 
139         
140         <listitem><para>Click on <guibutton>OK</guibutton> on the Network Control Panel.</para></listitem> 
141         
142         <listitem><para>Insert the Windows NT Server 4.0 install CD when prompted.</para></listitem> 
143 </itemizedlist>
144
145 <para>
146 At this point, the Netmon files should exist in <filename>%SYSTEMROOT%\System32\netmon\*.*</filename>.   
147 Two subdirectories exist as well, <filename>parsers\</filename> which contains the necessary DLLs
148 for parsing the Netmon packet dump, and <filename>captures\</filename>.
149 </para>
150
151 <para>
152 To install the Netmon tools on an NT Workstation, you will first need to install the 
153 Network  Monitor Agent from the Workstation install CD.
154 </para>
155
156 <itemizedlist>
157         <listitem><para>Go to <guibutton>Start</guibutton> -> <guibutton>Settings</guibutton> -> <guibutton>Control Panel</guibutton> -> 
158                         <guibutton>Network</guibutton> -> <guibutton>Services</guibutton> -> <guibutton>Add</guibutton>.</para></listitem> 
159
160         <listitem><para>Select the <guilabel>Network Monitor Agent</guilabel>, click on <guibutton>OK</guibutton>.</para></listitem> 
161         
162         <listitem><para>Click on <guibutton>OK</guibutton> in the Network Control Panel.
163         </para></listitem> 
164         
165         <listitem><para>Insert the Windows NT Workstation 4.0 install CD when prompted.</para></listitem> 
166 </itemizedlist>
167
168 <para>
169 Now copy the files from the NT Server in <filename>%SYSTEMROOT%\System32\netmon</filename>
170 to <filename>%SYSTEMROOT%\System32\netmon</filename> on the Workstation and set permissions
171 as you deem appropriate for your site. You will need administrative rights on the NT box to run Netmon.
172 </para>
173
174 </sect3>
175 <sect3>
176 <title>Installing Network Monitor on Windows 9x/Me</title>
177 <para>
178 To install Netmon on Windows 9x/Me, install the Network Monitor Agent 
179 from the Windows 9x/Me CD (<filename>\admin\nettools\netmon</filename>). 
180 There is a readme file located with the Netmon driver files on the CD if you need 
181 information on how to do this. Copy the files from a working Netmon installation.
182 </para>
183 </sect3>
184 </sect2>
185 </sect1>
186
187 <sect1>
188 <title>Useful URLs</title>
189 <itemizedlist>
190
191 <listitem><para>See how Scott Merrill simulates a BDC behavior at 
192        <ulink noescape="1" url="http://www.skippy.net/linux/smb-howto.html">
193        http://www.skippy.net/linux/smb-howto.html</ulink>. </para></listitem>
194
195 <listitem><para>FTP site for older SMB specs: 
196        <ulink noescape="1" url="ftp://ftp.microsoft.com/developr/drg/CIFS/">
197        ftp://ftp.microsoft.com/developr/drg/CIFS/</ulink></para></listitem>
198
199 </itemizedlist>
200
201 </sect1>
202
203 <sect1>
204 <title>Getting Mailing List Help</title>
205
206 <para>
207 There are a number of Samba-related mailing lists. Go to <ulink 
208 noescape="1" url="http://samba.org">http://samba.org</ulink>, click on your nearest mirror
209 and then click on <command>Support</command> and next click on <command>
210 Samba-related mailing lists</command>.
211 </para>
212
213 <para>
214 For questions relating to Samba TNG, go to
215 <ulink noescape="1" url="http://www.samba-tng.org/">http://www.samba-tng.org/.</ulink> 
216 It has been requested that you do not post questions about Samba-TNG to the
217 main-stream Samba lists.</para>
218
219 <para>
220 If you do post a message to one of the lists, please observe the following guidelines :
221 </para>
222
223 <itemizedlist>
224
225         <listitem><para>Always remember that the developers are volunteers, they are
226         not paid and they never guarantee to produce a particular feature at 
227         a particular time. Any timelines are <quote>best guess</quote> and nothing more.
228         </para></listitem>
229
230         <listitem><para>Always mention what version of Samba you are using and what 
231         operating system it's running under. You should list the relevant sections of
232         your &smb.conf; file, at least the options in <smbconfsection>[global]</smbconfsection>
233         that affect PDC support.
234         </para></listitem>
235
236         <listitem><para>In addition to the version, if you obtained Samba via
237         CVS, mention the date when you last checked it out.</para></listitem>
238
239         <listitem><para>Try and make your questions clear and brief. Lots of long, 
240         convoluted questions get deleted before they are completely read!
241         Do not post HTML encoded messages. Most people on mailing lists simply delete
242         them.
243         </para></listitem>
244
245         <listitem><para>If you run one of those nifty <quote>I'm on holidays</quote> things when
246         you are away, make sure its configured to not answer mailing list traffic. Auto-responses
247         to mailing lists really irritate the thousands of people who end up having to deal
248         with such bad netiquet bahavior.
249         </para></listitem> 
250
251         <listitem><para>Don't cross post. Work out which is the best list to post to 
252         and see what happens. Do not post to both samba-ntdom and samba-technical.
253         Many people active on the lists subscribe to more 
254         than one list and get annoyed to see the same message two or more times.
255         Often someone will see a message and thinking it would be better dealt 
256         with on another list, will forward it on for you.</para></listitem>
257
258         <listitem><para>You might include <emphasis>partial</emphasis>
259         log files written at a debug level set to as much as 20. 
260         Please do not send the entire log but just enough to give the context of the
261         error messages.</para></listitem>
262
263         <listitem><para>If you have a complete Netmon trace (from the opening of
264         the pipe to the error), you can send the *.CAP file as well.</para></listitem> 
265             
266         <listitem><para>Please think carefully before attaching a document to an email.
267         Consider pasting the relevant parts into the body of the message. The Samba
268         mailing lists go to a huge number of people. Do they all need a copy of your 
269         &smb.conf; in their attach directory?</para></listitem>
270
271 </itemizedlist>
272
273 </sect1>
274
275 <sect1>
276 <title>How to Get Off the Mailing Lists</title>
277
278 <para>To have your name removed from a Samba mailing list, go to the same
279 place where you went to
280 subscribe to it. Go to <ulink noescape="1" url="http://lists.samba.org/">http://lists.samba.org</ulink>, 
281 click on your nearest mirror, click on <command>Support</command> and 
282 then click on<command> Samba related mailing lists</command>. 
283 </para>
284
285 <para>
286 Please do not post messages to the list asking to be removed. You will only
287 be referred to the above address (unless that process failed in some way).
288 </para>
289
290 </sect1>
291
292 </chapter>