启动时启用 slapd

启动时启用 slapd

我在redhat7.7的服务器上安装了openldap服务器,当我启动它时,出现错误。

我得到以下内容

#systemctl status slapd.service
● slapd.service - OpenLDAP Server Daemon
   Loaded: loaded (/usr/lib/systemd/system/slapd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2019-11-13 03:37:09 CST; 7min ago
     Docs: man:slapd
           man:slapd-config
           man:slapd-hdb
           man:slapd-mdb
           file:///usr/share/doc/openldap-servers/guide.html
  Process: 104932 ExecStart=/usr/sbin/slapd -u ldap -h ${SLAPD_URLS} $SLAPD_OPTIONS (code=exited, status=1/FAILURE)
  Process: 104900 ExecStartPre=/usr/libexec/openldap/check-config.sh (code=exited, status=0/SUCCESS)

Nov 13 03:37:09 ServerG runuser[104925]: pam_unix(runuser:session): session c...p
Nov 13 03:37:09 ServerG runuser[104927]: pam_unix(runuser:session): session o...)
Nov 13 03:37:09 ServerG runuser[104927]: pam_unix(runuser:session): session c...p
Nov 13 03:37:09 ServerG runuser[104929]: pam_unix(runuser:session): session o...)
Nov 13 03:37:09 ServerG runuser[104929]: pam_unix(runuser:session): session c...p
Nov 13 03:37:09 ServerG slapd[104932]: @(#) $OpenLDAP: slapd 2.4.44 (Dec 18 ... $
                                                                   [email protected]
Nov 13 03:37:09 ServerG systemd[1]: slapd.service: control process exited, c...=1
Nov 13 03:37:09 ServerG systemd[1]: Failed to start OpenLDAP Server Daemon.
Nov 13 03:37:09 ServerG systemd[1]: Unit slapd.service entered failed state.
Nov 13 03:37:09 ServerG systemd[1]: slapd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

我进行了很多搜索并尝试了 100 种方法,但没有任何帮助,当我尝试手动运行它时,最后出现以下错误。你认为它说我没有配置 SSL 吗?

TLSMC: MozNSS compatibility interception ends.
TLS: could not use certificate `OpenLDAP Server'.
TLS: error:0200100D:system library:fopen:Permission denied bss_file.c:402
TLS: error:20074002:BIO routines:FILE_CTRL:system lib bss_file.c:404
TLS: error:140AD002:SSL routines:SSL_CTX_use_certificate_file:system lib ssl_rsa.c:468
5dcbcf86 main: TLS init def ctx failed: -1
5dcbcf86 slapd destroy: freeing system resources.
5dcbcf86 slapd stopped.
5dcbcf86 connections_destroy: nothing to destroy.

我该如何修复它?

答案1

尝试这个:

启动时启用 slapd

systemctl enable slapd.service

检查 Selinux 状态

sestatus

禁用 Selinux

setenforce Permissive

相关内容