I've noticed that Samba server logs to /var/log/smb.conf and /var/log/messages. How to disable logs from /var/log/messages? I've tried to edit the rsyslog config file:

*.info;mail.none;authpriv.none;cron.none;smb.none /var/log/messages

  • but this disabled all messages in /var/log/messages

System: CentOS 6.2 Samba Version 3.5.10-116.el6_2



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.

The smb.conf syslog directive says this

This parameter maps how Samba debug messages are logged onto the system syslog logging levels. Samba debug level zero maps onto syslog LOG_ERR, debug level one maps onto LOG_WARNING, debug level two maps onto LOG_NOTICE, debug level three maps onto LOG_INFO. All higher levels are mapped to LOG_DEBUG.

This parameter sets the threshold for sending messages to syslog. Only messages with debug level less than this value will be sent to syslog. There still will be some logging to log.[sn]mbd even if syslog only is enabled.

Default: syslog = 1

This means that under default conditions LOG_ERR messages will be logged to syslog too. You gould put

syslog = 0

in your /etc/smb.conf which should stop anything going to syslog.

You'll need to check you .etc/samba/smb.conf file for

It would probably be a good idea to check through the smb.conf documentation too for other logging options.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.