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.

2 comments:

Lukino said...

I have been browsing the entire internet in the last two days looking for this simple example. Thank you.

Dave Hay said...

Excellent news, thanks for letting me know. Dave

Visual Studio Code - Wow 🙀

Why did I not know that I can merely hit [cmd] [p]  to bring up a search box allowing me to search my project e.g. a repo cloned from GitHub...