0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

はじめてのアドベントカレンダーAdvent Calendar 2023

Day 22

389 Directory Server構築時のldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)

Last updated at Posted at 2023-12-09

事象

389 Directory Server構築にldapsearchでldapsを使用すると以下のエラーが出ました。

# ldapsearch -LLL -x -H ldaps://127.0.0.1/ -b dc=sample,dc=com
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)

解決方法

以下のサイトが参考になりました。
https://www.conversion.co.jp/tecblog/20200303/

vi /etc/openldap/ldap.conf

#
# LDAP Defaults
#

# See ldap.conf(5) for details
# This file should be world readable but not world writable.

#BASE   dc=example,dc=com
#URI    ldap://ldap.example.com ldap://ldap-master.example.com:666

#SIZELIMIT      12
#TIMELIMIT      15
#DEREF          never

# When no CA certificates are specified the Shared System Certificates
# are in use. In order to have these available along with the ones specified
# by TLS_CACERTDIR one has to include them explicitly:
#TLS_CACERT     /etc/pki/tls/cert.pem

# System-wide Crypto Policies provide up to date cipher suite which should
# be used unless one needs a finer grinded selection of ciphers. Hence, the
# PROFILE=SYSTEM value represents the default behavior which is in place
# when no explicit setting is used. (see openssl-ciphers(1) for more info)
#TLS_CIPHER_SUITE PROFILE=SYSTEM

# Turning this off breaks GSSAPI used with krb5 when rdns = false
SASL_NOCANON    on
TLS_REQCERT never  ←左記の設定を追加 今回はneverに設定しました。
環境によって異なるため、上記の設定は確認してください。

389 Directory Serverのサービス名は設定した値にしてください

systemctl restart dirsrv@389 Directory Serverインスタンスの名前.service

解決しました

[root@ip-10-0-9-116 ~]# ldapsearch -LLL -x -H ldaps://127.0.0.1/ -b dc=sample,dc=com
dn: dc=sample,dc=com
objectClass: top
objectClass: domain
dc: sample
description: dc=sample,dc=com
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?