7

Hi all have been trying to make a samba ubuntu server and I ran testparm and it came up with ---- WARNING "syslog" option is deprecated' ---- In smb.conf I have syslog set to 0 (I have no idea what that means) If anyone has any ideas. Thank Nic

  • 1
    "deprecated" just means that the option will be removed in a later release of the software. – Soren A Jan 2 '17 at 23:09
  • Not sure what that means but journalctl provides same as syslog and is preferred under new systemd systems these days. – WinEunuuchs2Unix Jan 2 '17 at 23:11
8

The syntax you are looking for is: logging = syslog@1 /var/log/samba/log.%m

Just comment out or remove syslog = 0. The number is the severity mapping for which logs the errors go into. 0=> log_err, 1=> log_warning, 2=> log_notice.

The number parameter sets a threshold for sending messages to syslog. Only messages with debug level less than this value will be sent to syslog.

Default is 1. If you are setting up a development sandbox I would just whack that stuff unless you are having problems and need to see the logs.

I'm using Debian and the above syntax shows no errors running testparm.

  • Thankyou for your informed answer! It let me understand. Thanks again – Nicolas Hanna Jan 9 '18 at 23:30
  • Are you able to explain that config line? I think what it's saying is to log via syslog errors and warnings, and also to log them in /var/log/samba/log.error and /var/log/samba/log.warning – Ackis Jan 11 '18 at 16:11
4

I had the same warning. It went away when I commented out the line

syslog = 0

in the file smb.conf.

  • 4
    @DavidFoerster Can you explain? This answer gives a specific solution. I don't know how well it will work, but the OP didn't express a desire to keep the syslog = 0 line. This seems like an answer to me. – Eliah Kagan Aug 8 '17 at 11:11
2

Newer versions of Samba have a more powerful parameter named logging which provides finer control over logging. The warning tells you that in future versions the parameter syslog may be considered for removal in favor of the newer logging. See man smb.conf for details.

0

As a supplement to @user760430 answer, You can use multiple log "backends". In my example: syslog and file.

# log file
log file = /var/log/samba/log.%m

# no log to syslog (0-level), log 2-level to file 
logging = syslog@0 file@2

# overall log level
log level = 3

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.