#130452 - 2004-12-02 11:35 AM
Re: HowTo get LDAP object
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Sorry, this is about as far as I can go as I don't have a test environment.
The only things I can think of are:
- Maybe the LDAP server is throwing an error - have you tried querying using the LDAP servers native client tools to make sure that the search works? Are there any log files associated with the LDAP server that you can check?
- Maybe the data type you have used simply doesn't work with the MS providers? Have you used the same data types as on the standard objects?
|
|
Top
|
|
|
|
#130453 - 2004-12-02 12:16 PM
Re: HowTo get LDAP object
|
jan
Getting the hang of it
Registered: 2004-07-07
Posts: 66
|
I have no problems with MS clients. I'm using JXplorer and that works finde.
The only thing i do is change the objectname of what I want to display. I'm been told the type is the same for all objects
|
|
Top
|
|
|
|
#130454 - 2004-12-02 04:09 PM
Re: HowTo get LDAP object
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Ok, there is some good and bad news.
Lots of other people seem to have this problem. I don't really understand LDAP myself, but from what I'm reading the MS LDAP provider caches the LDAP structure locally and uses this to interrogate the server.
Here is a posting I found on a Novell site to fix a similar problem, it is a work-around (highlight in bold are mine):
Quote:
Hi,
Microsoft's ADSI libraries have an incompatibility with the eDirectory schema (to which they have been made aware by Novell).
For standard schema entries, your get method will work ok. But for any schema definitions outside the standard set, you will have to tell ADSI what type it is, and read it with the GetInfoEx Arry etc.
For more information on this please go to developer.novell.com/support and search on ADSI. For your script, I've pasted a quick sample below. The types are enumerated at http://msdn.microsoft.com/library/en-us/netdir/adsi/adstypeenum.asp?frame=true
Code:
set UserObj=GetObject( "LDAP://myserver/o=novell/cn=admin" ) UserObj.GetInfoEx Array("fullname"), 3 Set entry = UserObj.GetPropertyItem( "fullname", 3 ) 'ci string type For Each v In entry.Values 'if multivalued attribute Set propVal = v descString = propVal.GetObjectProperty(3) 'ci string type wscript.stdout.writeline descString Next
Let me know if you have problems with this. It works for me, but I'm not a winscript expert by any means.
Thank you Susan Perrin
Here is a link to a KB article about accessing third-party LDAP servers using ADSI: http://support.microsoft.com/kb/q251195/
I found these by GOOGLEing using the original error message that you had.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 641 anonymous users online.
|
|
|