slapd não inicia (devido a falta de certificado?)

1

Estou tentando configurar um servidor OpenLDAP em um CentOS 7.5. Seguindo este O guia parecia funcionar muito bem até que algo deu errado (a senha do LDAP não era mais aceita) devido a uma falha no servidor. Eu não conseguia nem descobrir qual era o problema, então tentei redefinir todas as coisas do OpenLDAP no sistema executando estas linhas:

systemctl stop slapd
systemctl disable slapd
yum -y remove openldap-servers openldap-clients
rm -rf /var/lib/ldap
userdel ldap
rm -rf /etc/openldap

Infelizmente, a última linha excluiu alguns certificados e, portanto, não consigo mais iniciar o slapd.service. Quando eu tento

systemctl start slapd.service

Eu recebo um erro citando:

Job for slapd.service failed because the control process exited with error code. See "systemctl status slapd.service" and "journalctl -xe" for details.

"journalctl -xe" me diz o seguinte:

Jun 01 10:40:15 ldap sudo[6291]: tigraebe : TTY=pts/0 ; PWD=/etc/pki/tls/certs ; USER=root ; COMMAND=/bin/systemctl start slapd.service
Jun 01 10:40:15 ldap polkitd[1104]: Registered Authentication Agent for unix-process:6292:584482 (system bus name :1.136 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit
Jun 01 10:40:15 ldap systemd[1]: Starting OpenLDAP Server Daemon...
-- Subject: Unit slapd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit slapd.service has begun starting up.
Jun 01 10:40:15 ldap runuser[6303]: pam_unix(runuser:session): session opened for user ldap by (uid=0)
Jun 01 10:40:15 ldap runuser[6303]: pam_unix(runuser:session): session closed for user ldap
Jun 01 10:40:15 ldap slapcat[6307]: DIGEST-MD5 common mech free
Jun 01 10:40:15 ldap slapd[6316]: @(#) $OpenLDAP: slapd 2.4.44 (May 16 2018 09:55:53) $
                                         [email protected]:/builddir/build/BUILD/openldap-2.4.44/openldap-2.4.44/servers/slapd
Jun 01 10:40:15 ldap slapd[6316]: main: TLS init def ctx failed: -1
Jun 01 10:40:15 ldap slapd[6316]: DIGEST-MD5 common mech free
Jun 01 10:40:15 ldap slapd[6316]: slapd stopped.
Jun 01 10:40:15 ldap slapd[6316]: connections_destroy: nothing to destroy.
Jun 01 10:40:15 ldap systemd[1]: slapd.service: control process exited, code=exited status=1
Jun 01 10:40:15 ldap systemd[1]: Failed to start OpenLDAP Server Daemon.
-- Subject: Unit slapd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit slapd.service has failed.
-- 
-- The result is failed.

O único erro que eu posso ver é a linha com (é sobre certs, porque eu deletei a pasta openldap contendo a subpasta certs /?):

Jun 01 10:40:15 ldap slapd[6316]: main: TLS init def ctx failed: -1

Mas eu não tenho ideia de como resolver este problema, mesmo depois de passar horas lendo na internet e tentando fazer isso sozinho.

Qualquer sugestão ou conselho é bem-vinda, mas lembre-se de mim usando o CentOS e não o Ubuntu.

Obrigado antecipadamente

    
por Tim Gräber 01.06.2018 / 10:54

0 respostas