Table of Contents
There are many sources of information available in the form of mailing lists, RFCs and documentation. The documentation that comes with the Samba distribution contains good explanations of general SMB topics such as browsing.
With SMB networking, it is often not immediately clear what the cause is of a certain problem. Samba itself provides rather useful information, but in some cases you might have to fall back to using a sniffer. A sniffer is a program that listens on your LAN, analyzes the data sent on it and displays it on the screen.
One of the best diagnostic tools for debugging problems is Samba itself. You can use the -d option for both smbd and nmbd to specify the debug level at which to run. See the man pages for smbd, nmbd and smb.conf for more information regarding debugging options. The debug level can range from 1 (the default) to 10 (100 for debugging passwords).
Another helpful method of debugging is to compile Samba using the gcc -g flag. This will include debug information in the binaries and allow you to attach gdb to the running smbd/nmbd process. To attach gdb to an smbd process for an NT workstation, first get the workstation to make the connection. Pressing ctrl-alt-delete and going down to the domain box is sufficient (at least, the first time you join the domain) to generate a LsaEnumTrustedDomains. Thereafter, the workstation maintains an open connection and there will be an smbd process running (assuming that you haven't set a really short smbd idle timeout). So, in between pressing ctrl-alt-delete and actually typing in your password, you can attach gdb and continue.
Some useful Samba commands worth investigating are:
$ testparm | more
$ smbclient -L //{netbios name of server}
Tcpdump was the first UNIX sniffer with SMB support. It is a command-line utility and now, its SMB support is somewhat lagging that of ethereal and tethereal.
Ethereal is a graphical sniffer, available for both UNIX (Gtk) and Windows. Ethereal's SMB support is quite good.
For details on the use of ethereal, read the well-written Ethereal User Guide.
Listen for data on ports 137, 138, 139, and 445. For example, use the filter port 137, port 138, port 139, or port 445 as seen in Starting a capture snapshot.
A console version of ethereal is available as well and is ./usr/share/samba/swat/help/Samba-HOWTO-Collection/problems.html 0000644 0000000 0000000 00000041304 10727222031 024576 0 ustar root root 0000000 0000000
Table of Contents
There are many sources of information available in the form of mailing lists, RFCs and documentation. The documentation that comes with the Samba distribution contains good explanations of general SMB topics such as browsing.
With SMB networking, it is often not immediately clear what the cause is of a certain problem. Samba itself provides rather useful information, but in some cases you might have to fall back to using a sniffer. A sniffer is a program that listens on your LAN, analyzes the data sent on it and displays it on the screen.
One of the best diagnostic tools for debugging problems is Samba itself. You can use the -d option for both smbd and nmbd to specify the debug level at which to run. See the man pages for smbd, nmbd and smb.conf for more information regarding debugging options. The debug level can range from 1 (the default) to 10 (100 for debugging passwords).
Another helpful method of debugging is to compile Samba using the gcc -g flag. This will include debug information in the binaries and allow you to attach gdb to the running smbd/nmbd process. To attach gdb to an smbd process for an NT workstation, first get the workstation to make the connection. Pressing ctrl-alt-delete and going down to the domain box is sufficient (at least, the first time you join the domain) to generate a LsaEnumTrustedDomains. Thereafter, the workstation maintains an open connection and there will be an smbd process running (assuming that you haven't set a really short smbd idle timeout). So, in between pressing ctrl-alt-delete and actually typing in your password, you can attach gdb and continue.
Some useful Samba commands worth investigating are:
$ testparm | more
$ smbclient -L //{netbios name of server}
Tcpdump was the first UNIX sniffer with SMB support. It is a command-line utility and now, its SMB support is somewhat lagging that of ethereal and tethereal.
Ethereal is a graphical sniffer, available for both UNIX (Gtk) and Windows. Ethereal's SMB support is quite good.
For details on the use of ethereal, read the well-written Ethereal User Guide.
Listen for data on ports 137, 138, 139, and 445. For example, use the filter port 137, port 138, port 139, or port 445 as seen in Starting a capture snapshot.
A console version of ethereal is available as well and is ./usr/share/samba/swat/help/Samba-HOWTO-Collection/problems.html 0000644 0000000 0000000 00000041304 10727222031 024576 0 ustar root root 0000000 0000000