Bug 18455 - samba is logging to two log files
Summary: samba is logging to two log files
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: samba
Version: 7.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jay Fenlason
QA Contact: Dale Lovelace
: 16644 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2000-10-05 17:57 UTC by Karsten Weiss
Modified: 2014-08-31 23:24 UTC (History)
3 users (show)

Clone Of:
Last Closed: 2004-11-16 21:05:03 UTC

Attachments (Terms of Use)

Description Karsten Weiss 2000-10-05 17:57:16 UTC
samba is logging to two log files (log.smb *and* smb.log, log.nmb *and*
at the same time.


[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
[root@addx samba]#

Comment 1 Nigel Metheringham 2000-10-18 17:10:17 UTC
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))
 CONFIGFILE = $(LIBDIR)/smb.conf
 DRIVERFILE = $(LIBDIR)/printers.def

Comment 2 Trond Eivind Glomsrxd 2001-06-21 23:36:46 UTC
Still a problem - will fix.

Comment 3 Trond Eivind Glomsrxd 2001-06-22 00:15:27 UTC
*** Bug 16644 has been marked as a duplicate of this bug. ***

Comment 4 Trond Eivind Glomsrxd 2001-08-09 18:18:54 UTC
It's still a problem... a patch I applied made it log to both log.smbd and

Comment 5 giulioo 2002-08-26 09:58:14 UTC
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 thing?

Comment 6 giulioo 2002-08-28 12:01:18 UTC
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 {


Comment 7 Jay Fenlason 2004-11-16 21:05:03 UTC
Current releases of Samba do not appear to have this problem.   

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