1 <chapter id="problems">
7 <firstname>David</firstname><surname>Bannon</surname>
9 <orgname>Samba Team</orgname>
10 <address><email>dbannon@samba.org</email></address>
13 <pubdate>8 Apr 2003</pubdate>
16 <title>Analysing and solving samba problems</title>
19 There are many sources of information available in the form
20 of mailing lists, RFC's and documentation. The docs that come
21 with the samba distribution contain very good explanations of
22 general SMB topics such as browsing.</para>
25 <title>Diagnostics tools</title>
28 One of the best diagnostic tools for debugging problems is Samba itself.
29 You can use the <option>-d option</option> for both &smbd; and &nmbd; to specify what
30 <parameter>debug level</parameter> at which to run. See the man pages on smbd, nmbd and
31 smb.conf for more information on debugging options. The debug
32 level can range from 1 (the default) to 10 (100 for debugging passwords).
36 Another helpful method of debugging is to compile samba using the
37 <userinput>gcc -g </userinput> flag. This will include debug
38 information in the binaries and allow you to attach gdb to the
39 running smbd / nmbd process. In order to attach gdb to an smbd
40 process for an NT workstation, first get the workstation to make the
41 connection. Pressing ctrl-alt-delete and going down to the domain box
42 is sufficient (at least, on the first time you join the domain) to
43 generate a 'LsaEnumTrustedDomains'. Thereafter, the workstation
44 maintains an open connection, and therefore there will be an smbd
45 process running (assuming that you haven't set a really short smbd
46 idle timeout) So, in between pressing ctrl alt delete, and actually
47 typing in your password, you can attach gdb and continue.
51 Some useful samba commands worth investigating:
55 <prompt>$ </prompt><userinput>testparam | more</userinput>
56 <prompt>$ </prompt><userinput>smbclient -L //{netbios name of server}</userinput>
60 An SMB enabled version of tcpdump is available from
61 <ulink url="http://www.tcpdump.org/">http://www.tcpdup.org/</ulink>.
62 Ethereal, another good packet sniffer for Unix and Win32
63 hosts, can be downloaded from <ulink
64 url="http://www.ethereal.com/">http://www.ethereal.com</ulink>.
68 For tracing things on the Microsoft Windows NT, Network Monitor
69 (aka. netmon) is available on the Microsoft Developer Network CD's,
70 the Windows NT Server install CD and the SMS CD's. The version of
71 netmon that ships with SMS allows for dumping packets between any two
72 computers (i.e. placing the network interface in promiscuous mode).
73 The version on the NT Server install CD will only allow monitoring
74 of network traffic directed to the local NT box and broadcasts on the
75 local subnet. Be aware that Ethereal can read and write netmon
82 <title>Installing 'Network Monitor' on an NT Workstation or a Windows 9x box</title>
85 Installing netmon on an NT workstation requires a couple
86 of steps. The following are for installing Netmon V4.00.349, which comes
87 with Microsoft Windows NT Server 4.0, on Microsoft Windows NT
88 Workstation 4.0. The process should be similar for other versions of
89 Windows NT / Netmon. You will need both the Microsoft Windows
90 NT Server 4.0 Install CD and the Workstation 4.0 Install CD.
94 Initially you will need to install <application>Network Monitor Tools and Agent</application>
95 on the NT Server. To do this
99 <listitem><para>Goto <guibutton>Start</guibutton> - <guibutton>Settings</guibutton> - <guibutton>Control Panel</guibutton> -
100 <guibutton>Network</guibutton> - <guibutton>Services</guibutton> - <guibutton>Add</guibutton> </para></listitem>
102 <listitem><para>Select the <guilabel>Network Monitor Tools and Agent</guilabel> and
103 click on <guibutton>OK</guibutton>.</para></listitem>
105 <listitem><para>Click <guibutton>OK</guibutton> on the Network Control Panel.
108 <listitem><para>Insert the Windows NT Server 4.0 install CD
109 when prompted.</para></listitem>
113 At this point the Netmon files should exist in
114 <filename>%SYSTEMROOT%\System32\netmon\*.*</filename>.
115 Two subdirectories exist as well, <filename>parsers\</filename>
116 which contains the necessary DLL's for parsing the netmon packet
117 dump, and <filename>captures\</filename>.
121 In order to install the Netmon tools on an NT Workstation, you will
122 first need to install the 'Network Monitor Agent' from the Workstation
127 <listitem><para>Goto <guibutton>Start</guibutton> - <guibutton>Settings</guibutton> - <guibutton>Control Panel</guibutton> -
128 <guibutton>Network</guibutton> - <guibutton>Services</guibutton> - <guibutton>Add</guibutton></para></listitem>
130 <listitem><para>Select the <guilabel>Network Monitor Agent</guilabel> and click
131 on <guibutton>OK</guibutton>.</para></listitem>
133 <listitem><para>Click <guibutton>OK</guibutton> on the Network Control Panel.
136 <listitem><para>Insert the Windows NT Workstation 4.0 install
137 CD when prompted.</para></listitem>
141 Now copy the files from the NT Server in <filename>%SYSTEMROOT%\System32\netmon\*.*</filename>
142 to <filename>%SYSTEMROOT%\System32\netmon\*.*</filename> on the Workstation and set
143 permissions as you deem appropriate for your site. You will need
144 administrative rights on the NT box to run netmon.
148 To install Netmon on a Windows 9x box install the network monitor agent
149 from the Windows 9x CD (<filename>\admin\nettools\netmon</filename>). There is a readme
150 file located with the netmon driver files on the CD if you need
151 information on how to do this. Copy the files from a working
158 <title>Useful URL's</title>
161 <listitem><para>See how Scott Merrill simulates a BDC behavior at
162 <ulink url="http://www.skippy.net/linux/smb-howto.html">
163 http://www.skippy.net/linux/smb-howto.html</ulink>. </para></listitem>
165 <listitem><para>FTP site for older SMB specs:
166 <ulink url="ftp://ftp.microsoft.com/developr/drg/CIFS/">
167 ftp://ftp.microsoft.com/developr/drg/CIFS/</ulink></para></listitem>
170 <!-- FIXME: Merge with Further Resources -->
175 <title>Getting help from the mailing lists</title>
178 There are a number of Samba related mailing lists. Go to <ulink
179 url="http://samba.org">http://samba.org</ulink>, click on your nearest mirror
180 and then click on <command>Support</command> and then click on <command>
181 Samba related mailing lists</command>.
185 For questions relating to Samba TNG go to
186 <ulink url="http://www.samba-tng.org/">http://www.samba-tng.org/</ulink>
187 It has been requested that you don't post questions about Samba-TNG to the
188 main stream Samba lists.</para>
191 If you post a message to one of the lists please observe the following guide lines :
196 <listitem><para> Always remember that the developers are volunteers, they are
197 not paid and they never guarantee to produce a particular feature at
198 a particular time. Any time lines are 'best guess' and nothing more.
201 <listitem><para> Always mention what version of samba you are using and what
202 operating system its running under. You should probably list the
203 relevant sections of your &smb.conf; file, at least the options
204 in [global] that affect PDC support.</para></listitem>
206 <listitem><para>In addition to the version, if you obtained Samba via
207 CVS mention the date when you last checked it out.</para></listitem>
209 <listitem><para> Try and make your question clear and brief, lots of long,
210 convoluted questions get deleted before they are completely read !
211 Don't post html encoded messages (if you can select colour or font
212 size its html).</para></listitem>
214 <listitem><para> If you run one of those nifty 'I'm on holidays' things when
215 you are away, make sure its configured to not answer mailing lists.
218 <listitem><para> Don't cross post. Work out which is the best list to post to
219 and see what happens, i.e. don't post to both samba-ntdom and samba-technical.
220 Many people active on the lists subscribe to more
221 than one list and get annoyed to see the same message two or more times.
222 Often someone will see a message and thinking it would be better dealt
223 with on another, will forward it on for you.</para></listitem>
225 <listitem><para>You might include <emphasis>partial</emphasis>
226 log files written at a debug level set to as much as 20.
227 Please don't send the entire log but enough to give the context of the
228 error messages.</para></listitem>
230 <listitem><para>(Possibly) If you have a complete netmon trace ( from the opening of
231 the pipe to the error ) you can send the *.CAP file as well.</para></listitem>
233 <listitem><para>Please think carefully before attaching a document to an email.
234 Consider pasting the relevant parts into the body of the message. The samba
235 mailing lists go to a huge number of people, do they all need a copy of your
236 smb.conf in their attach directory?</para></listitem>
243 <title>How to get off the mailinglists</title>
245 <para>To have your name removed from a samba mailing list, go to the
246 same place you went to to get on it. Go to <ulink
247 url="http://lists.samba.org/">http://lists.samba.org</ulink>,
248 click on your nearest mirror and then click on <command>Support</command> and
249 then click on <command> Samba related mailing lists</command>. Or perhaps see
250 <ulink url="http://lists.samba.org/mailman/roster/samba-ntdom">here</ulink>
254 Please don't post messages to the list asking to be removed, you will just
255 be referred to the above address (unless that process failed in some way...)