Trying to get same results from LDIFDE vs. LDP

  • Thread starter Thread starter Grant Schenck
  • Start date Start date
G

Grant Schenck

Hello,

I'm writing some VB scripts to understand LDAP and AD.

I found some public LDAP directories and using MS' LDP utility was able to
retrive some names from the University of Pennsylvania's LDAP Server.
However, using LDIFDE I keep getting "No Entries Found".

I'm assuming that at the core, any search I can run from LDP I should be
able to run from LDIFDE...

So, if someone can take a look at my command line I'd appreciate knowing
what I'm doing wrong. Because this is a public LDAP server you should be
able to try it yourself.
--
Grant Schenck

-----------------------------------------------
This shows my use of LDIFDE and the results
-----------------------------------------------
C:\AD>ldifde -f Exportuser.ldf
-s directory.upenn.edu
-d "dc=Export,dc=com"
-p subtree
-r "(&(objectCategory=person)(objectClass=User)(givenname=*))"
-l "cn,givenName,objectclass,samAccountName"
-a "" ""

Connecting to "directory.upenn.edu"
Logging in as "" using simple bind
Exporting directory to file Exportuser.ldf
Searching for entries...
Writing out entries
No Entries found

The command has completed successfully

-----------------------------------------------
This shows my LDP log:
-----------------------------------------------
ld = ldap_open("directory.upenn.edu", 389);
Established connection to directory.upenn.edu.
Retrieving base DSA information...
Result <0>: (null)
Matched DNs:
Getting 1 entries:2> objectClass: top; OpenLDAProotDSE;
-----------
res = ldap_simple_bind_s(ld, 'NULL', <unavailable>); // v.3
Authenticated as dn:'NULL'.
***Searching...
ldap_search_s(ld, "ou=People,o=upenn.edu", 1, "sn=ESPE*", attrList, 0,
&msg)
Result <0>: (null)
Matched DNs:
Getting 3 entries:1> sn: ESPELETA JR;
 
Hi,

I believe you should not specify the -a parameter. It works for me without
it in my domain. With your command it's trying to authenticate as user ""
with password "". Also, it retrieves users that have any value for
givenName, except missing. If you only want users that have a givenName
specified, good. Otherwise, skip that clause.

Finally, is it ok for the server "directory.upenn.edu" to be in a different
name space from the root of the search "dc=Export,dc=com"?
 
Back
Top