LDAP服务器托pipe在Solaris上。 客户端是CentOS。 通过LDAP的OpenLDAP / NSLCD / SSHauthentication工作正常,但我不能使用ldapsearch命令来debuggingLDAP问题。
[root@tst-01 ~]# ldapsearch SASL/EXTERNAL authentication started ldap_sasl_interactive_bind_s: Unknown authentication method (-6) additional info: SASL(-4): no mechanism available: [root@tst-01 ~]# cat /etc/openldap/ldap.conf TLS_CACERTDIR /etc/openldap/cacerts URI ldap://ldap1.tst.domain.tld ldap://ldap2.tst.domain.tld BASE dc=tst,dc=domain,dc=tld [root@tst-01 ~]# ls -al /etc/openldap/cacerts total 12 drwxr-xr-x. 2 root root 4096 Jun 6 10:31 . drwxr-xr-x. 3 root root 4096 Jun 10 10:12 .. -rw-r--r--. 1 root root 895 Jun 6 10:01 cacert.pem lrwxrwxrwx. 1 root root 10 Jun 6 10:31 cf848aa4.0 -> cacert.pem [root@tst-01 ~]#
我已经通过ldapsearch尝试使用证书进行身份validation,并将/etc/openldap/cacerts/cacert.pem作为参数,但不接受此证书进行身份validation。
您可能希望closuresSASL并使用“-x”选项进行简单validation。 例如,search一个特定的用户
ldapsearch -x -D "uid=search-user,ou=People,dc=example,dc=com" \ -W -H ldap://ldap.example.com -b "ou=People,dc=example,dc=com" \ -s sub 'uid=test-user'
将通过find“testing用户”
似乎我问同样的问题: https : //stackoverflow.com/questions/27571558/how-was-authentication-built-on-ldap
这可以概括为(在命令行中的实验):
$ ldapsearch -x -h ldap.company.com -s sub -b 'dc=europe,dc=com' "uid=XYZ" .... dn: uid=XYZ,dc=sales,dc=europe,dc=com ... $ ldapsearch -W -h ldap.company.com -D 'uid=XYZ,dc=sales,dc=europe,dc=com' \ -s sub -b 'dc=europe,dc=com' "uid=XYZ"