If something goes wrong upon starting one of the Samba servers, an error message appears on the command line. However, runtime diagnostic messages go to the log.nmbd and log.smbd log files.
These files are usually in a var directory, but you can change the location to dir by specifying the -l dir option to smbd and nmbd . However, if you want to override the log directory location (to /var/log , for example), it's usually better to change the log file directory and log filename at once with the log file parameter in smb.conf . You can force the log output from smbd to a file with this line in the [global] section of your smb.conf :
log file = /var/log/smb.log
Unfortunately, this does not set the nmbd log directory; if you want the log output from both daemons to go to the same file, you must still use nmbd -l /var/log/smb.log .