SASL LDAP身份验证失败

Gur*_*kha 10 authentication ldap sasl

尝试使用SASLAND LDAP来验证用户身份RedHat Linux.到目前为止,我已经设置了saslauthd服务并启动并运行.我/etc/saslauthd.conf看起来如下:

ldap_servers: ldaps://test.ldap.server:1234
ldap_use_sasl: yes
ldap_mech: DIGEST-MD5
ldap_auth_method: fastbind
ldap_search_base: Ou=PeopleAuthSrch,DC=abc,DC=com
Run Code Online (Sandbox Code Playgroud)

/etc/sasl2/smtpd.conf看起来如下:

pwcheck_method: saslauthd
mech_list: plain login
Run Code Online (Sandbox Code Playgroud)

现在,当我尝试使用以下命令测试身份验证时:

testsaslauthd -u username -p password -f /var/run/saslauthd/mux

我明白了 0: NO "authentication failed"

当我看到日志时,它说:

Retrying authentication
do_auth   :auth failure: [user:myuser]  [service=imap] [realm=] [mech=ldap] [reason=unknown]
Run Code Online (Sandbox Code Playgroud)

我在这里失踪了什么?提前致谢!!

更新:

使用以下命令安装OpenLdap进行搜索:

ldapsearch -x -h ldaps://my.ldap.server:port -d8

for ldapsearch命令工作我修改/etc/openldap/ldap.conf文件如下:

tls_reqcert allow
TLS_CACERTDIR /home/myuser/cacertss
LDAPTLS_CACERT /home/myuser/cacertss
Run Code Online (Sandbox Code Playgroud)

它返回所有条目,但我仍然无法使用身份验证

testsaslauthd -u username -p password -f/var/run/saslauthd/mux

我需要做什么才能获得此身份验证?

Gur*_*kha 4

经过 5 天的努力,发现我使用的设置是Active directory我应该使用的设置,LDAP如下所示:

ldap_servers: ldaps://test.ldap.server:1234
ldap_search_base: Ou=PeopleAuthSrch,DC=abc,DC=com
ldap_filters: (uid=%u)
ldap_tls_cacert_file: /path/to/my/certificate
Run Code Online (Sandbox Code Playgroud)

我确实按照 Bertold Kolics 提到的那样安装了cyrus-sasl-md5,我不确定这是否在验证用户身份方面发挥了作用。