Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Samba HowTo Guide
Prev Home Next

Debugging with Samba Itself

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 (log 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}

Samba HowTo Guide
Prev Home Next

 
 
  Published under the terms fo the GNU General Public License Design by Interspire