Samba and Terminal Server, V1.06, October 2007

18
5.5 Logging
Samba has many smb.conf logfile naming options for the logging feature. A common log file
configuration is:
log file = /usr/local/samba/log.%m
The %m substitution variable supplies the NetBIOS name of the client machine, and the resulting
logfile is named “log.machinename”. When a single smbd process is serving multiple Terminal
Server users, this configuration will result in all of the Terminal Server user sessions log events
being written to a single logfile with the NetBIOS name of the Terminal Server itself substituting
for machinename.
A more usable log file naming convention for Terminal Server usage is to use the %U substitution
variable:
log file = /usr/local/samba/log.%U
This will result in individual logfiles for every unique Terminal Server user name.