【发布时间】:2016-08-20 19:50:39
【问题描述】:
尝试使用SASL AND 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
我的/etc/sasl2/smtpd.conf 如下所示:
pwcheck_method: saslauthd
mech_list: plain login
现在,当我尝试使用以下命令测试身份验证时:
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]
我在这里缺少什么?提前谢谢!!
更新:
安装 OpenLdap 以使用以下命令进行搜索:
ldapsearch -x -h ldaps://my.ldap.server:port -d8
为了让 ldapsearch 命令正常工作,我修改了 /etc/openldap/ldap.conf 文件如下:
tls_reqcert allow
TLS_CACERTDIR /home/myuser/cacertss
LDAPTLS_CACERT /home/myuser/cacertss
它返回所有条目,但我仍然无法使用身份验证
testsaslauthd -u 用户名 -p 密码 -f /var/run/saslauthd/mux
我需要在这里做什么才能通过身份验证?
【问题讨论】:
标签: authentication ldap sasl