In Debian/Ubuntu, the samba packages include a logrotate chunk that allows logfiles (nmbd.log and smbd.log, which are the logfiles used by samba in the default setup) to be rotated weekly. This is done with logrotate. The entry for samba is: /var/log/samba/log.smbd { weekly missingok rotate 7 postrotate invoke-rc.d --quiet samba reload > /dev/null endscript compress notifempty } /var/log/samba/log.nmbd { weekly missingok rotate 7 postrotate [ ! -f /var/run/samba/nmbd.pid ] || kill -HUP `cat /var/run/samba/nmbd.pid` endscript compress notifempty } However, our user in Debian bug #394770 noticed that smbd continues to write to the rotated file(s), named smbd.log.0, instead of writing to smbd.log So, it seems that smbd does not close/reopen the logfile when stopped with SIGHUP. Of course, I'm opened to any suggeston to improve this (except stop/start of the samba daemons when rotating the logfiles, of course)
The very same bug is reported for winbind: see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=280420
That bug seems to be away in 3.2.5 and 3.3.0. When I rotate logs on my Debian machine, with logrotate (and a SIGHUP signal), samba does not continue writing on old log files
As I wrote in the bug log, this bug is fixed for ages...:-)