[Eisfair] samba spamt messages-log (2)

Marcus Röckrath marcus.roeckrath at gmx.de
Sa Sep 10 18:26:34 CEST 2022


Hallo Jürgen,

Jürgen Pfautsch wrote:

>> Wieso loggt dein samba überhaupt in messages und nicht in log.smbd?
> 
> Gute Frage. Das smbd.log enthält paar Fehlermeldungen von der Installation
> und ist ansonsten erstaunlich leer.

Samba wird von mir - und auch früher von Jürgen - ohne syslog-Unterstützung
kompiliert.

Das wäre aber notwendig, damit samba in die messges loggen könnte:


4.8.1 Using syslog

If you wish to use the system logger ( syslog ) in addition to or in place
of the standard Samba logging file, Samba provides options for this as
well. However, to use syslog, the first thing you will have to do is make
sure that Samba was built with the configure --with-syslog option. See
Chapter 2 for more information on configuring and compiling Samba.

Once that is done, you will need to configure your /etc/syslog.conf to
accept logging information from Samba. If there is not already a daemon.*
entry in the /etc/syslog.conf file, add the following:


daemon.*        /var/log/daemon.log

This specifies that any logging information from system daemons will be
stored in the /var/log/daemon.log file. This is where the Samba information
will be stored as well. From there, you can specify the following global
option in your configuration file:


syslog = 2

This specifies that any logging messages with a level of 1 will be sent to
both the syslog and the Samba logging files. (The mappings to syslog
priorities are described in the upcoming section "syslog.") Let's assume
that we set the regular log level option above to 4. Any logging messages
with a level of 2, 3, or 4 will be sent to the Samba logging files, but not
to the syslog. Only level 1 logging messages will be sent to both. If the
syslog value exceeds the log level value, nothing will be written to the
syslog.

If you want to specify that messages be sent only to syslog - and not to the
standard Samba logging files - you can place this option in the
configuration file:


syslog only = yes

If this is the case, any logging information above the number specified in
the syslog option will be discarded, just like the log level option.


-- 
Gruß Marcus
[eisfair-Team]


Mehr Informationen über die Mailingliste Eisfair