When trying to logrotate smabe log files the samba daemons are sent
a SIGHUP signal. These daemons does not use SIGHUP for the usual
purpose, and the new log files are therefore not opened after they have
Then again, samba will rotate the logs by itself when the size reaches
the max log size as defined in smb.conf.
That is the case for RH6.1 but probably on 6.2 as well.
Actually the latest samba versions (2.0.6 and 2.0.7, maybe 2.0.5) should re-
open the logs on HUP, this is the documented behavior.
However, this does not always work, if a connection is already opened, it will
keep logging to the old rotated log.
I kept submitting this problem to the samba list for a long time, then I
decided to solve it on my own:
edit /etc/logrotate.d/samba and add "copytruncate"
/usr/bin/killall -HUP nmbd
/usr/bin/killall -HUP smbd
This way the logs are rotated properly because they are truncated in place and
Samba rotates the log by size only if you tell it to do so.
And however, there is a bug in that too in versions < 2.0.7.
samba logrotation problems should be fixed as of samba-2.0.7-16 and