我已经在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.d
的描述;/etc/ldap/slapd.d/cn=config.ldif
中有一个名为olcLogLevel
的参数,很可能是这个参数,但是slapd.conf
中的其他内容如何呢?
总之,我的问题是:如何更改新方案中的日志级别和日志文件?
发布于 2023-04-14 15:07:25
请参阅slapd-config(5)
手册页面。几乎所有的设置都在LDAP配置后端保留相同的名称,只使用olc
名称空间前缀。(你真的应该通过LDAP或者至少通过slapmodify
来编辑这些内容,而不是手工编辑。)
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‐
https://unix.stackexchange.com/questions/742890
复制相似问题