OpenLDAP SASL身份验证

时间:2018-03-27 17:05:55

标签: authentication rsa openldap pam sasl

我通过OpenLDAP设置此身份验证:

OpenLDAP - >传递(外部认证) - > SASL - > PAM - > RSA代理

通过RSA令牌访问应用程序。

从下到上:

这是我的PAM配置:

#%PAM-1.0
auth required pam_securid.so
account      sufficient pam_ldap.so
account    include      password-auth
password      sufficient pam_ldap.so
password   include      password-auth

此测试效果很好:

[root@ldap ~]# testsaslauthd -u goingsolo -p 11111111
0: OK "Success."

OpenLdap已正确配置为与PLAIN中的SASL Authenticatino一起使用:

[root@ldap /]# ldapsearch -h localhost -b "" -LLL -s base supportedSASLMechanisms -x
dn:
supportedSASLMechanisms: PLAIN

我的goingsolo用户的userPassword配置了{SASL}goingsolo如果我执行了SASL绑定,它就可以运行:

[root@datap-keldap-1-n01 /]# ldapsearch -h localhost -b dc=ldap,dc=com -U "goingsolo" -w 11111111                  
SASL/PLAIN authentication started
0: OK "Success."

问题是,当我使用-D而不是-U执行简单绑定时,我会收到无效凭据:

[root@datap-keldap-1-n01 /]# ldapsearch -h localhost -b dc=ldap,dc=com -D "cn=goingsolo,ou=People,dc=ldap,dc=com" -w 11111111                  
ldap_bind: Invalid credentials (49)

当使用完整的dn执行sasl绑定时,身份验证失败,因为来自/ var / lag / messages:

Mar 27 19:01:00 ldap saslauthd[11777]: do_auth         : auth failure: [user=cn=goingsolo,ou=People,dc=ldap,dc=com] [service=ldap] [realm=] [mech=pam] [reason=PAM auth error]

我想这是因为它不是从完整的dn转换为简单的用户(goingsolo)。

有关我应该检查什么的任何提示?

1 个答案:

答案 0 :(得分:0)

问题是如何构建OpenLdap(我猜错了编译)。我尝试重新安装它然后它工作。确保SASL机制设置为plain。

相关问题