I know about this param, I configured it and log.smbd, log.nmbd and others are rotated, log.samba is not. ----- Original Message -----> From: "samba" <samba at lists.samba.org> > To: "Lorenzo Milesi" <maxxer at yetopen.it>, "samba" <samba at lists.samba.org> > Sent: Thursday, May 21, 2020 7:29:04 PM > Subject: Re: [Samba] log.samba missing rotation> From man smb.conf: > > < > max log size (G) > > This option (an integer in kilobytes) specifies the max size the log > file should grow to. Samba periodically checks the size and if it is > exceeded it will rename the file, adding a .old extension. > > A size of 0 means no limit. > > Default: max log size = 5000 > > Example: max log size = 1000 >> > > > If you need a more complex rotation, I suppose you will need to configure it > with logrotate. > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba-- Lorenzo Milesi - lorenzo.milesi at yetopen.it YetOpen S.r.l. - https://www.yetopen.it/ Via Salerno 18 - 23900 Lecco - ITALY - Tel +39 0341 220 205 - Fax +39 178 6070 222 Think green - Non stampare questa e-mail se non necessario / Don't print this email unless necessary -------- D.Lgs. 196/2003 e GDPR 679/2016 -------- Tutte le informazioni contenute in questo messaggio sono riservate ed a uso esclusivo del destinatario. Tutte le informazioni ivi contenute, compresi eventuali allegati, sono da ritenere confidenziali e riservate secondo i termini del vigente D.Lgs. 196/2003 in materia di privacy e del Regolamento europeo 679/2016 - GDPR - e quindi ne e' proibita l'utilizzazione ulteriore non autorizzata. Nel caso in cui questo messaggio Le fosse pervenuto per errore, La invitiamo ad eliminarlo senza copiarlo, stamparlo, a non inoltrarlo a terzi e ad avvertirci non appena possibile. Grazie. Confidentiality notice: this email message including any attachment is for the sole use of the intended recipient and may contain confidential and privileged information; pursuant to Legislative Decree 196/2003 and the European General Data Protection Regulation 679/2016 - GDPR - any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recepient please delete this message without copying, printing or forwarding it to others, and alert us as soon as possible. Thank you.
Looks like a known issue when running samba as AD DC: https://bugzilla.samba.org/show_bug.cgi?id=9673 Perhaps try logrotate service to help rotate log.samba: https://linux.die.net/man/8/logrotate -- Regards, Jones Syue | ??? QNAP Systems, Inc. On Fri, May 22, 2020 at 12:26 PM Lorenzo Milesi via samba <samba at lists.samba.org> wrote:> > I know about this param, I configured it and log.smbd, log.nmbd and others are rotated, log.samba is not. > > ----- Original Message ----- > > From: "samba" <samba at lists.samba.org> > > To: "Lorenzo Milesi" <maxxer at yetopen.it>, "samba" <samba at lists.samba.org> > > Sent: Thursday, May 21, 2020 7:29:04 PM > > Subject: Re: [Samba] log.samba missing rotation > > > From man smb.conf: > > > > < > > max log size (G) > > > > This option (an integer in kilobytes) specifies the max size the log > > file should grow to. Samba periodically checks the size and if it is > > exceeded it will rename the file, adding a .old extension. > > > > A size of 0 means no limit. > > > > Default: max log size = 5000 > > > > Example: max log size = 1000 > >> > > > > > > If you need a more complex rotation, I suppose you will need to configure it > > with logrotate. > > > > > > -- > > To unsubscribe from this list go to the following URL and read the > > instructions: https://lists.samba.org/mailman/options/samba > > -- > Lorenzo Milesi - lorenzo.milesi at yetopen.it > > YetOpen S.r.l. - https://www.yetopen.it/ > Via Salerno 18 - 23900 Lecco - ITALY - > Tel +39 0341 220 205 - Fax +39 178 6070 222 > > Think green - Non stampare questa e-mail se non necessario / Don't print this email unless necessary > > -------- D.Lgs. 196/2003 e GDPR 679/2016 -------- > Tutte le informazioni contenute in questo messaggio sono riservate ed a uso esclusivo del destinatario. > Tutte le informazioni ivi contenute, compresi eventuali allegati, sono da ritenere confidenziali e riservate secondo i termini > del vigente D.Lgs. 196/2003 in materia di privacy e del Regolamento europeo 679/2016 - GDPR - e quindi ne e' proibita l'utilizzazione ulteriore non autorizzata. > Nel caso in cui questo messaggio Le fosse pervenuto per errore, La invitiamo ad eliminarlo senza copiarlo, stamparlo, a non inoltrarlo a terzi e ad avvertirci non appena possibile. > Grazie. > > Confidentiality notice: this email message including any attachment is for the sole use of the intended recipient and may contain confidential and privileged information; > pursuant to Legislative Decree 196/2003 and the European General Data Protection Regulation 679/2016 - GDPR - any unauthorized review, use, disclosure or distribution > is prohibited. If you are not the intended recepient please delete this message without copying, printing or forwarding it to others, and alert us as soon as possible. > Thank you. > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba
> Looks like a known issue when running samba as AD DC: > https://bugzilla.samba.org/show_bug.cgi?id=9673Altought it doesn't seem exactly my issue I've enabled logrotate. This is my samba logging config: log level = 9 log file = /usr/local/samba/var/log.client.%m max log size = 50000 And this is my logrotate /usr/local/samba/var/log.samba { daily missingok rotate 14 compress notifempty postrotate killall -SIGHUP smbd >/dev/null 2>&1 endscript } Unfortunately after rotating log files the killall command didn't have any effect, log.samba hasn't been created ever since. I tried smbcontrol all reload-config but the same, no log.samba file anymore! -- Lorenzo Milesi - lorenzo.milesi at yetopen.it YetOpen S.r.l. - https://www.yetopen.it/ Via Salerno 18 - 23900 Lecco - ITALY - Tel +39 0341 220 205 - Fax +39 178 6070 222 Think green - Non stampare questa e-mail se non necessario / Don't print this email unless necessary -------- D.Lgs. 196/2003 e GDPR 679/2016 -------- Tutte le informazioni contenute in questo messaggio sono riservate ed a uso esclusivo del destinatario. Tutte le informazioni ivi contenute, compresi eventuali allegati, sono da ritenere confidenziali e riservate secondo i termini del vigente D.Lgs. 196/2003 in materia di privacy e del Regolamento europeo 679/2016 - GDPR - e quindi ne e' proibita l'utilizzazione ulteriore non autorizzata. Nel caso in cui questo messaggio Le fosse pervenuto per errore, La invitiamo ad eliminarlo senza copiarlo, stamparlo, a non inoltrarlo a terzi e ad avvertirci non appena possibile. Grazie. Confidentiality notice: this email message including any attachment is for the sole use of the intended recipient and may contain confidential and privileged information; pursuant to Legislative Decree 196/2003 and the European General Data Protection Regulation 679/2016 - GDPR - any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recepient please delete this message without copying, printing or forwarding it to others, and alert us as soon as possible. Thank you.
Can you try this and adjust the path's in it. #/etc/logrotate.d/samba /var/log/samba/log.smbd { weekly missingok rotate 7 postrotate [ ! -x /usr/bin/smbcontrol ] || [ ! -f /run/samba/smbd.pid ] || /usr/bin/smbcontrol smbd reload-config endscript compress delaycompress notifempty } /var/log/samba/log.nmbd { weekly missingok rotate 7 postrotate [ ! -x /usr/bin/smbcontrol ] || [ ! -f /run/samba/nmbd.pid ] || /usr/bin/smbcontrol nmbd reload-config endscript compress delaycompress notifempty } /var/log/samba/log.samba { weekly missingok rotate 7 postrotate if [ -d /run/systemd/system ] && command systemctl >/dev/null 2>&1 && systemctl is-active --quiet samba-ad-dc; then systemctl kill --kill-who all --signal=SIGHUP samba-ad-dc elif [ -f /run/samba/samba.pid ]; then # This only sends to main pid, See #803924 kill -HUP `cat /run/samba/samba.pid` fi endscript compress delaycompress notifempty } #/etc/logrotate.d/winbind /var/log/samba/log.winbindd { weekly missingok rotate 7 postrotate if [ -x /usr/bin/smbcontrol ]; then /usr/bin/smbcontrol winbindd reload-config elif [ -f /run/samba/winbindd.pid ]; then kill -HUP `cat /run/samba/winbindd.pid` fi endscript compress delaycompress notifempty }> -----Oorspronkelijk bericht----- > Van: samba [mailto:samba-bounces at lists.samba.org] Namens > Lorenzo Milesi via samba > Verzonden: maandag 25 mei 2020 13:11 > Aan: samba > Onderwerp: Re: [Samba] log.samba missing rotation > > > Looks like a known issue when running samba as AD DC: > > https://bugzilla.samba.org/show_bug.cgi?id=9673 > > Altought it doesn't seem exactly my issue I've enabled logrotate. > > This is my samba logging config: > > log level = 9 > log file = /usr/local/samba/var/log.client.%m > max log size = 50000 > > > And this is my logrotate > /usr/local/samba/var/log.samba { > daily > missingok > rotate 14 > compress > notifempty > postrotate > killall -SIGHUP smbd >/dev/null 2>&1 > endscript > } > > Unfortunately after rotating log files the killall command > didn't have any effect, log.samba hasn't been created ever since. > I tried smbcontrol all reload-config but the same, no > log.samba file anymore! > > -- > Lorenzo Milesi - lorenzo.milesi at yetopen.it > > YetOpen S.r.l. - https://www.yetopen.it/ > Via Salerno 18 - 23900 Lecco - ITALY - > Tel +39 0341 220 205 - Fax +39 178 6070 222 > > Think green - Non stampare questa e-mail se non necessario / > Don't print this email unless necessary > > -------- D.Lgs. 196/2003 e GDPR 679/2016 -------- > Tutte le informazioni contenute in questo messaggio sono > riservate ed a uso esclusivo del destinatario. > Tutte le informazioni ivi contenute, compresi eventuali > allegati, sono da ritenere confidenziali e riservate secondo i termini > del vigente D.Lgs. 196/2003 in materia di privacy e del > Regolamento europeo 679/2016 - GDPR - e quindi ne e' proibita > l'utilizzazione ulteriore non autorizzata. > Nel caso in cui questo messaggio Le fosse pervenuto per > errore, La invitiamo ad eliminarlo senza copiarlo, stamparlo, > a non inoltrarlo a terzi e ad avvertirci non appena possibile. > Grazie. > > Confidentiality notice: this email message including any > attachment is for the sole use of the intended recipient and > may contain confidential and privileged information; > pursuant to Legislative Decree 196/2003 and the European > General Data Protection Regulation 679/2016 - GDPR - any > unauthorized review, use, disclosure or distribution > is prohibited. If you are not the intended recepient please > delete this message without copying, printing or forwarding > it to others, and alert us as soon as possible. > Thank you. > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba > >