我已经在 Debian 11 上设置了 openLDAP 2.4,我想更改一些参数,比如 loglevel 和 logfile,这看起来非常简单:
# 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
;有一个调用的参数olcLogLevel
可能/etc/ldap/slapd.d/cn=config.ldif
是一个参数,但是来自 的其他所有参数呢slapd.conf
?
无论如何,我的问题是:如何更改新方案中的日志级别和日志文件?
请参阅
slapd-config(5)
手册页。几乎所有设置都在 LDAP 配置后端中保留相同的名称,只是带有olc
名称空间前缀。(而且您真的应该通过 LDAP 或至少通过 编辑这些内容slapmodify
,而不是手动编辑。)