Friday, 10 October 2014

Problems with LDAPSearch against Active Directory 2008

So I was doing this: -

ldapsearch -h ad2008.uk.ibm.com -p 389 -D CN=ldapbind,CN=Users,DC=uk,DC=ibm -w passw0rd CN=ldapbind

but was seeing this: -

# extended LDIF
#
# LDAPv3
# base <> (default) with scope subtree
# filter: CN=ldapbind
# requesting: ALL
#

# search result
search: 2
result: 32 No such object
text: 0000208D: NameErr: DSID-031001E5, problem 2001 (NO_OBJECT), data 0, best match of: ''

# numResponses: 1


Can you see what I did wrong ?

Yep, I forgot to add the base Distinguished Name: -

ldapsearch -h ad2008.uk.ibm.com -p 389 -D CN=ldapbind,CN=Users,DC=uk,DC=ibm -w passw0rd -b DC=uk,DC=ibm CN=ldapbind 

...
dn: CN=ldapbind,CN=Users,DC=uk,DC=ibm
distinguishedName: CN=ldapbind,CN=Users,DC=uk,DC=ibm

...

which is nice.

No comments: