Contents
How to enable or disable logging in Samba server?
Using the default settings, logging is disabled. To enable logging, set the log level parameter in the [global] section in the smb.conf . A higher log level includes logging of events from lower levels. In most scenarios you set set one log level for all events.
Why are my Samba log files so big?
However, setting a higher log level causes Samba to log all events on the higher level, what can result in large log files. Samba enables you to set individual log levels for certain debug classes, while logging all other events on a different level.
How to set the debug level in samba?
Setting the Debug Level for a Command. Samba commands use the log level set in the log level parameter in the smb.conf file. For details, see Setting the Log Level in the smb.conf File. However, you can override this value using the -d parameter for all Samba commands. For example: For details, see the manual page of the Samba command.
How to troubleshoot samba with a specific client?
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 system 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.
What can you do with a Samba server?
On a Samba server you can use logging to write detailed log files to find and debug problems, or to monitor events, such as users connecting to a share. Setting a log level enable you to control the amount of data that is logged.
What’s the default Samba log file in CentOS?
The default logging for samba on CentOS is to log to /var/log/samba/log.smbd and out of the box the log file setting is /var/log/samba/%m (the connecting machine log) so it looks like someone has made changes to at least some of the defaults. This parameter maps how Samba debug messages are logged onto the system syslog logging levels.