Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Tue, 28 Feb 2006 16:45:25 -0500,    group: microsoft.public.platformsdk.active.directory        back       


Trying to get same results from LDIFDE vs. LDP   
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:
>> Dn:
 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:
>> Dn: uid=despey,ou=people,o=upenn.edu
 1> sn: ESPEY;
>> Dn: uid=staceye,ou=people,o=upenn.edu
 1> sn: ESPENLAUB;
>> Dn: uid=espeletj,ou=people,o=upenn.edu
 1> sn: ESPELETA JR;
date: Tue, 28 Feb 2006 16:45:25 -0500   author:   Grant Schenck

Re: Trying to get same results from LDIFDE vs. LDP   
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"?

-- 
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net

"Grant Schenck"  wrote in message 
news:u6jOkBLPGHA.3576@TK2MSFTNGP15.phx.gbl...
> 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:
>>> Dn:
> 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:
>>> Dn: uid=despey,ou=people,o=upenn.edu
> 1> sn: ESPEY;
>>> Dn: uid=staceye,ou=people,o=upenn.edu
> 1> sn: ESPENLAUB;
>>> Dn: uid=espeletj,ou=people,o=upenn.edu
> 1> sn: ESPELETA JR;
>
>
date: Tue, 28 Feb 2006 16:09:22 -0600   author:   Richard Mueller

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us