SASL LDAP身份验证失败 [英] SASL LDAP authentication failure
问题描述
尝试使用 SASL
和 LDAP
在来验证用户的RedHat的Linux
。到目前为止,我已经设置了 saslauthd
服务和它的启动和运行。我的 /etc/saslauthd.conf
看起来如下:
Trying to use SASL
AND LDAP
to authenticate user in RedHat Linux
. So far I've setup the saslauthd
service and its up and running. My /etc/saslauthd.conf
looks like follows:
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
现在,当我尝试测试用下面的命令验证:
Now when I try to test the authentication with following command:
testsaslauthd -u用户名-p密码-f / var / run中/ saslauthd / MUX
我得到 0:NO验证失败
和当我看到日志它说:
Retrying authentication
do_auth :auth failure: [user:myuser] [service=imap] [realm=] [mech=ldap] [reason=unknown]
我缺少的是在这里吗?在此先感谢!
What am i missing here? thanks in advance!!
更新:
安装OpenLDAP的做用下面的命令搜索:
installed OpenLdap to do a search with the following command:
的ldapsearch -x -h LDAPS://my.ldap.server:端口〜D8
ldapsearch -x -h ldaps://my.ldap.server:port -d8
有关ldapsearch命令的工作我修改 /etc/openldap/ldap.conf中
文件如下:
for ldapsearch command to work i modified /etc/openldap/ldap.conf
file as follows:
tls_reqcert allow
TLS_CACERTDIR /home/myuser/cacertss
LDAPTLS_CACERT /home/myuser/cacertss
它返回的所有条目,但我使用仍然无法进行身份验证
It returns all the entries but i still cant authenticate using
testsaslauthd -u用户名-p密码-f / var / run中/ saslauthd / MUX
testsaslauthd -u username -p password -f /var/run/saslauthd/mux
什么我需要在这里做得到这个认证?
推荐答案
在奋斗了5天发现我使用的设置是活动目录
我应该是使用 LDAP
设置如下:
After 5 days of struggle found out that the settings i used was for Active directory
where i should be using settings for LDAP
as following:
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
我没有安装赛勒斯-SASL-MD5
作为贝托尔德Kolics提到的,我不知道如果在认证用户所扮演的角色。
I did install cyrus-sasl-md5
as Bertold Kolics mentioned, i'm not sure if that played the part on authenticating the user.
这篇关于SASL LDAP身份验证失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!