does 2.0.6 fix kill -HUP logrotation?

Roger Hayter roger at
Wed Jan 19 23:14:20 GMT 2000

> -----Original Message-----
> From: samba at [mailto:samba at]On Behalf Of
> Giulio Orsero
> Sent: 19 January 2000 22:24
> To: Multiple recipients of list SAMBA
> Subject: Re: does 2.0.6 fix kill -HUP logrotation?
> On Wed, 19 Jan 2000 08:02:43 +1100, hai scritto:
> >2.0.5 (on linux) has a small annoyance in that, when the log
> files get
> >rotated, kill -HUP won't point the daemons to the new log
> files. They keeps
> >logging to the old ones until they are stopped/started. Does
> 2.0.6 fix this?
> This is my personal experience:
> - now, after the hup, new connections go to new logs, active
> connections
> keep going to the old logs.
> - if you rotate the log with logrotate, telling it to gzip the files,
> then samba stops logging completely till restart.
> Since I rotate the logs at 4:00am (noone is connected to the server)
> this is now my logrotate script:
> /var/log/samba/log.nmb {
>     postrotate
>         /etc/rc.d/init.d/smb restart
>         #/usr/bin/killall -HUP nmbd
>     endscript
> }
> /var/log/samba/log.smb {
>     postrotate
>         /etc/rc.d/init.d/smb restart
>         #/usr/bin/killall -HUP smbd
>     endscript
> }

Something else that works, both for existing and new samba connections, and
works with the original "killall -HUP" line, is to insert the logrotate
option "copytruncate" before "postrotate" in the above file.  This has the
theoretical possibility of losing a message between the copy and the
truncate function, but otherwise solves the problem by allowing samba to log
to the original file in a truncated form while a copy is gzipped and/or
rotated (I think).


Roger Hayter

More information about the samba mailing list