On our server, Samba outputs log information to text files in the
var subdirectory of the Samba home directory, as set by the makefile during the build. The
log
file
option can be used to reset the name of the log file to another location. For example, to reset the name and location of the Samba log file to
/usr/local/logs/samba.log, you could use the following:
[global]
log file = /usr/local/logs/samba.log
You may use variable substitution to create log files specifically for individual users or clients.
You can override the default log file location using the
-l
command-line switch when either daemon is started. However, this does not override the
log
file
option. If you do specify this parameter, initial logging information will be sent to the file specified after
-l
(or the default specified in the Samba makefile) until the daemons have processed the
smb.conf file and know to redirect it to a new log file.