Just -h 10.2.250.15 -x -b 'dc=ldn,dc=sw,dc=com' "(&(objectClass=nisDomainObject)(nisDomain=ldn.sw.com))" should match the scripted search.
OK - I ran
ldapsearch2.4 -h 10.2.250.15 -D cn=proxyagent,ou=profile,dc=ldn,dc=sw,dc=com -w xxxxx -x -b 'dc=ldn,dc=sw,dc=com'
It showed me everything in the LDAP tree, Last few lines are
That's because it isn't the search I suggested you try...
OK - so I tried
ldapsearch2.4 -h 10.2.250.15 -x -b 'dc=ldn,dc=sw,dc=com' # extended LDIF # # LDAPv3 # base <dc=ldn,dc=sw,dc=com> with scope subtree # filter: (objectclass=*) # requesting: ALL #
# search result search: 2 result: 32 No such object
# numResponses: 1
What I don't understand is 'which' object is missing?
-- Ian.