Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 11927 - Samba doesn't need logrotate; doesn't work anyway
Samba doesn't need logrotate; doesn't work anyway
Product: Red Hat Linux
Classification: Retired
Component: samba (Show other bugs)
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
Depends On:
  Show dependency treegraph
Reported: 2000-06-06 11:37 EDT by vek
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-06-06 16:07:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description vek 2000-06-06 11:37:35 EDT
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
been rotated.

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.

Comment 1 giulioo 2000-06-06 16:07:00 EDT
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"

/var/log/samba/log.nmb {
        /usr/bin/killall -HUP nmbd
/var/log/samba/log.smb {
        /usr/bin/killall -HUP smbd

This way the logs are rotated properly because they are truncated in place and 
not moved/renamed.

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.

Comment 2 Bill Nottingham 2000-07-15 14:48:11 EDT
samba logrotation problems should be fixed as of samba-2.0.7-16 and

Note You need to log in before you can comment on or make changes to this bug.