Trying to get same results from LDIFDE vs. LDP

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;
 
R

Richard Mueller

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"?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top