slapd.dでログレベルを設定するには?

slapd.dでログレベルを設定するには?

Debian 11でopenLDAP 2.4を設定し、ログレベルやログファイルなどのいくつかのパラメータを変更したいと思います。これは非常に簡単に見えます。

# man slapd.conf
SLAPD.CONF(5)                                                       File Formats Manual                                                      SLAPD.CONF(5)

NAME
       slapd.conf - configuration file for slapd, the stand-alone LDAP daemon

SYNOPSIS
       /etc/ldap/slapd.conf

DESCRIPTION
       The  file /etc/ldap/slapd.conf contains configuration information for the slapd(8) daemon.  This configuration file is also used by the SLAPD tools
       slapacl(8), slapadd(8), slapauth(8), slapcat(8), slapdn(8), slapindex(8), and slaptest(8).
...
       logfile <filename>
              Specify a file for recording debug log messages. By default these messages only go to stderr and are not recorded anywhere else.  Specifying
              a logfile copies messages to both stderr and the logfile.

       loglevel <integer> [...]
              Specify  the level at which debugging statements and operation statistics should be syslogged (currently logged to the syslogd(8) LOG_LOCAL4
              facility).  They must be considered subsystems rather than increasingly verbose log levels.  Some messages with higher priority  are  logged
...

という名前のファイルがありませんslapd.conf。ファイルが置き換えられ、はるかに/etc/ldap/slapd.dきれいになりました。ただし、slapd.confパラメータがどのように適合するかについての説明が見つかりませんでした/etc/ldap/slapd.dolcLogLevel呼び出しには1つのパラメータがありますが、/etc/ldap/slapd.d/cn=config.ldifおそらくこのパラメータです。しかし、他のパラメータはどうですかslapd.conf

とにかく私の質問は:新しいスキームでログレベルとログファイルをどのように変更しますか?

ベストアンサー1

slapd-config(5)マニュアルページを参照してください。ほとんどすべての設定は、olc名前空間プレフィックスのみを含むLDAP設定バックエンドで同じ名前を保持します。 (slapmodify手動ではなくLDAPまたは少なくともLDAPで編集する必要があります。)

       olcLogFile: <filename>
              Specify a file for recording slapd debug messages. By default these  mes‐
              sages  only  go  to stderr, are not recorded anywhere else, and are unre‐
              lated to messages exposed by  the  olcLogLevel  configuration  parameter.
              Specifying a logfile copies messages to both stderr and the logfile.

       olcLogFileFormat: debug | syslog-utc | syslog-localtime
              Specify  the prefix format for messages written to the logfile. The debug

       [...]

       olcLogLevel: <integer> [...]
              Specify the level at which debugging statements and operation  statistics
              should be syslogged (currently logged to the syslogd(8) LOG_LOCAL4 facil‐

おすすめ記事