使用ldapsearch 验证URL和域账号:
ldapsearch -h your_ldap_url -p 389 -x -b "OU=xx,OU=Users,OU=xx,DC=xx,DC=xx,DC=xx" -D "your_user_name" -w "your_pass_word"
认证失败会直接报错:
ldap_bind: Invalid credentials (49)
additional info: 80090308: LdapErr: DSID-0C090453, comment: AcceptSecurityContext error, data 52e, v3839
认证成功会返回相关LDAP的配置信息:
extended LDIF
LDAPv3
base <OU=xx,OU=Users,OU=xx,DC=xx,DC=xx,DC=xx> with scope subtree
filter: (objectclass=*)
requesting: ALL
ldap用户的相关信息