An effective way to diagnose problems without hampering other users is to assign different log levels for different machines in
[global]
section of the
smb.conf file. We can do this by building on the strategy we presented earlier:
[global]
log level = 0
log file = /usr/local/samba/lib/log.%m
include = /usr/local/samba/lib/smb.conf.%m
These options instruct Samba to use unique configuration and log files for each client that connects. Now all you have to do is create an
smb.conf file for a specific client machine with a
log
level
=
3
entry in it (the others will pick up the default log level of 0) and use that log file to track down the problem.
Similarly, if only particular users are experiencing a problem, and it travels from machine to machine with them, you can isolate logging to a specific user by adding the following to the
smb.conf file:
[global]
log level = 0
log file = /usr/local/samba/lib/log.%u
include = /usr/local/samba/lib/smb.conf.%u
Then you can create a unique
smb.conf file for each user (e.g.,
/usr/local/samba/lib/smb.conf.tim) files containing the configuration option
log
level
=
3
and only those users will get more detailed logging.