samba is logging to two log files (log.smb *and* smb.log, log.nmb *and* nmb.log) at the same time. example: [root@addx samba]# /etc/rc.d/init.d/smb stop Shutting down SMB services: [ OK ] Shutting down NMB services: [ OK ] [root@addx samba]# rm /var/log/samba/* [root@addx samba]# /etc/rc.d/init.d/smb start Starting SMB services: [ OK ] Starting NMB services: [ OK ] [root@addx samba]# ls -l /var/log/samba/ insgesamt 12 -rw-r--r-- 1 root root 2462 Okt 5 19:24 log.nmb -rw-r--r-- 1 root root 117 Okt 5 19:24 log.smb -rw-r--r-- 1 root root 132 Okt 5 19:24 smb.log [root@addx samba]# grep log /etc/samba/smb.conf log file = /var/log/samba/%m.log max log size = 50 [root@addx samba]# cat log.smb [2000/10/05 19:24:49, 1] smbd/server.c:main(641) smbd version 2.0.7 started. Copyright Andrew Tridgell 1992-1998 [root@addx samba]# cat smb.log [2000/10/05 19:24:49, 1] smbd/files.c:file_init(216) file_init: Information only: requested 10000 open files, 1014 are available. [root@addx samba]#
See also 12832 and 18779 for the change that led to this problem.... The default logfile name has been changed to /var/log/samba/%.log but for strange arcane reasons there is also another log name wired into the Makefile and Makefile.in which has log.smb & log.nmb fixed as the initial log file used. Suggest this patch is added:- --- source/Makefile.in.orig Wed Oct 18 18:08:40 2000 +++ source/Makefile.in Wed Oct 18 18:09:49 2000 @@ -38,8 +38,8 @@ # set these to where to find various files # These can be overridden by command line switches (see smbd(8)) # or in smb.conf (see smb.conf(5)) -SMBLOGFILE = $(VARDIR)/log.smb -NMBLOGFILE = $(VARDIR)/log.nmb +SMBLOGFILE = $(VARDIR)/smb.log +NMBLOGFILE = $(VARDIR)/nmb.log CONFIGFILE = $(LIBDIR)/smb.conf LMHOSTSFILE = $(LIBDIR)/lmhosts DRIVERFILE = $(LIBDIR)/printers.def
Still a problem - will fix.
*** Bug 16644 has been marked as a duplicate of this bug. ***
It's still a problem... a patch I applied made it log to both log.smbd and smbd.log.
It seems this is still a problem in the latest public beta (null). The problem is that logfiles are not rotated. Is adding *.log to samba logrotate /var/log/samba/*.log /var/log/samba/log.* { a problem? Would logrotate be confused and start that 1.1.1.1.. thing?
I understand now that /var/log/samba/log.* cannot be used. Maybe /var/log/samba/*.log /var/log/samba/log.nmbd /var/log/samba/log.smbd { ... ?
Current releases of Samba do not appear to have this problem.