Bug 18455 - samba is logging to two log files
samba is logging to two log files
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: samba (Show other bugs)
7.0
i386 Linux
low Severity low
: ---
: ---
Assigned To: Jay Fenlason
Dale Lovelace
:
: 16644 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-10-05 13:57 EDT by Karsten Weiss
Modified: 2014-08-31 19:24 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-16 16:05:03 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Karsten Weiss 2000-10-05 13:57:16 EDT
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]#
Comment 1 Nigel Metheringham 2000-10-18 13:10:17 EDT
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
Comment 2 Trond Eivind Glomsrxd 2001-06-21 19:36:46 EDT
Still a problem - will fix.
Comment 3 Trond Eivind Glomsrxd 2001-06-21 20:15:27 EDT
*** Bug 16644 has been marked as a duplicate of this bug. ***
Comment 4 Trond Eivind Glomsrxd 2001-08-09 14:18:54 EDT
It's still a problem... a patch I applied made it log to both log.smbd and
smbd.log.
Comment 5 giulioo 2002-08-26 05:58:14 EDT
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?


Comment 6 giulioo 2002-08-28 08:01:18 EDT
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 16:05:03 EST
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.