Unable to bind to LDAP with multivalued RDNs using ADSI

Unable to bind to LDAP with multivalued RDNs using ADSI

Post by Carste » Fri, 30 Aug 2002 21:43:36



Hello,

I am using VB6 and IADS and try to bind to a LDAP
directory.
the bind DN contains a multivalued rdn like:


        ^

Does anyone know how I can bind with such a rdn?

I get the error: "An invalid directory pathname was passed"

----- snip --------
Dim iadso As IADs

Set iadso = myCustomerLDAP.iADsOpenDSObject.OpenDSObject( _
"LDAP://<server.<domain>.<topLevelDomain>:389/cn=User1+mail

,_                                          
<adminN>,_                                                
<pwd>,_                                                    
0)
---- snap ----

 
 
 

Unable to bind to LDAP with multivalued RDNs using ADSI

Post by Joe Richards [MVP » Sat, 31 Aug 2002 00:52:17


It looks like you are trying to bind to a search string, you can't do that.
You need to find the object with a search, and then do the bind once you
have the DN for the object.

RDN's are not multivalued.

--
Joe Richards
www.joeware.net
---


> Hello,

> I am using VB6 and IADS and try to bind to a LDAP
> directory.
> the bind DN contains a multivalued rdn like:


>         ^

> Does anyone know how I can bind with such a rdn?

> I get the error: "An invalid directory pathname was passed"

> ----- snip --------
> Dim iadso As IADs

> Set iadso = myCustomerLDAP.iADsOpenDSObject.OpenDSObject( _
> "LDAP://<server.<domain>.<topLevelDomain>:389/cn=User1+mail

> ,_
> <adminN>,_
> <pwd>,_
> 0)
> ---- snap ----


 
 
 

Unable to bind to LDAP with multivalued RDNs using ADSI

Post by Jason Robarts [MS » Sat, 31 Aug 2002 04:52:53


What platform are you using as a server?  Active Directory doesn't support
multiple attributes being used in the DN..

--
Jason Robarts
SDE/T - Active Directory Test Team

This posting is provided "AS IS" with no warranties, and confers no rights.


> Hello,

> I am using VB6 and IADS and try to bind to a LDAP
> directory.
> the bind DN contains a multivalued rdn like:


>         ^

> Does anyone know how I can bind with such a rdn?

> I get the error: "An invalid directory pathname was passed"

> ----- snip --------
> Dim iadso As IADs

> Set iadso = myCustomerLDAP.iADsOpenDSObject.OpenDSObject( _
> "LDAP://<server.<domain>.<topLevelDomain>:389/cn=User1+mail

> ,_
> <adminN>,_
> <pwd>,_
> 0)
> ---- snap ----

 
 
 

Unable to bind to LDAP with multivalued RDNs using ADSI

Post by Jason Robarts [MS » Sat, 31 Aug 2002 12:15:12


BTW, I did realize Joe mentioned the second point.  I'd just be surprised if
this wasn't working against a directory supporting that style of DN.

--
Jason Robarts
SDE/T - Active Directory Test Team

This posting is provided "AS IS" with no warranties, and confers no rights.



> What platform are you using as a server?  Active Directory doesn't support
> multiple attributes being used in the DN..

> --
> Jason Robarts
> SDE/T - Active Directory Test Team

> This posting is provided "AS IS" with no warranties, and confers no
rights.



> > Hello,

> > I am using VB6 and IADS and try to bind to a LDAP
> > directory.
> > the bind DN contains a multivalued rdn like:


> >         ^

> > Does anyone know how I can bind with such a rdn?

> > I get the error: "An invalid directory pathname was passed"

> > ----- snip --------
> > Dim iadso As IADs

> > Set iadso = myCustomerLDAP.iADsOpenDSObject.OpenDSObject( _
> > "LDAP://<server.<domain>.<topLevelDomain>:389/cn=User1+mail

> > ,_
> > <adminN>,_
> > <pwd>,_
> > 0)
> > ---- snap ----

 
 
 

Unable to bind to LDAP with multivalued RDNs using ADSI

Post by Carste » Sat, 31 Aug 2002 18:46:53


Quote:>-----Original Message-----
>What platform are you using as a server?  Active

Directory doesn't support

Quote:>multiple attributes being used in the DN..

I am using openldap server 2.0.23. Binding with other ldap-
clients works ....

>--
>Jason Robarts
>SDE/T - Active Directory Test Team

>This posting is provided "AS IS" with no warranties, and
confers no rights.



>> Hello,

>> I am using VB6 and IADS and try to bind to a LDAP
>> directory.
>> the bind DN contains a multivalued rdn like:


>>         ^

>> Does anyone know how I can bind with such a rdn?

>> I get the error: "An invalid directory pathname was
passed"

>> ----- snip --------
>> Dim iadso As IADs

>> Set iadso = myCustomerLDAP.iADsOpenDSObject.OpenDSObject
( _
>> "LDAP://<server.<domain>.<topLevelDomain>:389/cn=User1+m
ail


- Show quoted text -

Quote:>> ,_
>> <adminN>,_
>> <pwd>,_
>> 0)
>> ---- snap ----

>.

 
 
 

Unable to bind to LDAP with multivalued RDNs using ADSI

Post by Carste » Sat, 31 Aug 2002 18:53:29


Quote:>-----Original Message-----
>It looks like you are trying to bind to a search string,
you can't do that.
>You need to find the object with a search, and then do
the bind once you
>have the DN for the object.

well, I did in that way, I just simplified my example code

Quote:

>RDN's are not multivalued.

in
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/netdir/adsi/ldap_adspath.asp

there is a documentation about valid LDAP ADsPaths. It
refers to "distinguished name notation"  in
http://www.ietf.org/rfc/rfc1779.txt

there you can find:

Quote:>> Here is an example of a multi-valued Relative

Distinguished Name,
   where the namespace is flat within an organisation, and
department is
   used to disambiguate certain names:

   OU=Sales + CN=J. Smith, O=Widget Inc., C=US
<<

so mulitvalued RelativeDistinguishedNames  should be
supported, I think

regards, Carsten

>--
>Joe Richards
>www.joeware.net
>---



>> Hello,

>> I am using VB6 and IADS and try to bind to a LDAP
>> directory.
>> the bind DN contains a multivalued rdn like:


>>         ^

>> Does anyone know how I can bind with such a rdn?

>> I get the error: "An invalid directory pathname was
passed"

>> ----- snip --------
>> Dim iadso As IADs

>> Set iadso = myCustomerLDAP.iADsOpenDSObject.OpenDSObject
( _
>> "LDAP://<server.<domain>.<topLevelDomain>:389/cn=User1+m
ail


- Show quoted text -

Quote:>> ,_
>> <adminN>,_
>> <pwd>,_
>> 0)
>> ---- snap ----

>.

 
 
 

Unable to bind to LDAP with multivalued RDNs using ADSI

Post by Joe Richards [MVP » Mon, 02 Sep 2002 07:31:04


Interesting, since you were using VB and ADSI and I saw DC= in the DN I
inappropriately assumed you were using Active Directory. In AD the RDNs at
each level are equal to the CN's which are singlevalue attributes which
means no multivalue RDN's.

  joe

--
Joe Richards
www.joeware.net
---


> >-----Original Message-----
> >It looks like you are trying to bind to a search string,
> you can't do that.
> >You need to find the object with a search, and then do
> the bind once you
> >have the DN for the object.

> well, I did in that way, I just simplified my example code

> >RDN's are not multivalued.

> in
> http://msdn.microsoft.com/library/default.asp?
> url=/library/en-us/netdir/adsi/ldap_adspath.asp

> there is a documentation about valid LDAP ADsPaths. It
> refers to "distinguished name notation"  in
> http://www.ietf.org/rfc/rfc1779.txt

> there you can find:

> >> Here is an example of a multi-valued Relative
> Distinguished Name,
>    where the namespace is flat within an organisation, and
> department is
>    used to disambiguate certain names:

>    OU=Sales + CN=J. Smith, O=Widget Inc., C=US
> <<

> so mulitvalued RelativeDistinguishedNames  should be
> supported, I think

> regards, Carsten

> >--
> >Joe Richards
> >www.joeware.net
> >---



> >> Hello,

> >> I am using VB6 and IADS and try to bind to a LDAP
> >> directory.
> >> the bind DN contains a multivalued rdn like:


> >>         ^

> >> Does anyone know how I can bind with such a rdn?

> >> I get the error: "An invalid directory pathname was
> passed"

> >> ----- snip --------
> >> Dim iadso As IADs

> >> Set iadso = myCustomerLDAP.iADsOpenDSObject.OpenDSObject
> ( _
> >> "LDAP://<server.<domain>.<topLevelDomain>:389/cn=User1+m
> ail


> >> ,_
> >> <adminN>,_
> >> <pwd>,_
> >> 0)
> >> ---- snap ----

> >.

 
 
 

Unable to bind to LDAP with multivalued RDNs using ADSI

Post by Joe Richards [MVP » Mon, 02 Sep 2002 07:41:25


My recommendation would be to set up a network trace and trace the "other"
client as well as your VB client and see what the difference is in the
actual trace. LDAP is nice in that NetMon decodes it to a fairly readable
point.

--
Joe Richards
www.joeware.net
---

 
 
 

Unable to bind to LDAP with multivalued RDNs using ADSI

Post by Jason Robarts [MS » Thu, 05 Sep 2002 01:30:53


I've asked a few questions.  ADSI doesn't support multivalued RDNs.

--
Jason Robarts
SDE/T - Active Directory Test Team

This posting is provided "AS IS" with no warranties, and confers no rights.


> >-----Original Message-----
> >What platform are you using as a server?  Active
> Directory doesn't support
> >multiple attributes being used in the DN..

> I am using openldap server 2.0.23. Binding with other ldap-
> clients works ....

> >--
> >Jason Robarts
> >SDE/T - Active Directory Test Team

> >This posting is provided "AS IS" with no warranties, and
> confers no rights.



> >> Hello,

> >> I am using VB6 and IADS and try to bind to a LDAP
> >> directory.
> >> the bind DN contains a multivalued rdn like:


> >>         ^

> >> Does anyone know how I can bind with such a rdn?

> >> I get the error: "An invalid directory pathname was
> passed"

> >> ----- snip --------
> >> Dim iadso As IADs

> >> Set iadso = myCustomerLDAP.iADsOpenDSObject.OpenDSObject
> ( _
> >> "LDAP://<server.<domain>.<topLevelDomain>:389/cn=User1+m
> ail


> >> ,_
> >> <adminN>,_
> >> <pwd>,_
> >> 0)
> >> ---- snap ----

> >.

 
 
 

Unable to bind to LDAP with multivalued RDNs using ADSI

Post by Carste » Thu, 05 Sep 2002 16:55:01


thanks a lot, this info saves time

Carsten

>-----Original Message-----
>I've asked a few questions.  ADSI doesn't support
multivalued RDNs.

>--
>Jason Robarts
>SDE/T - Active Directory Test Team

>This posting is provided "AS IS" with no warranties, and
confers no rights.



>> >-----Original Message-----
>> >What platform are you using as a server?  Active
>> Directory doesn't support
>> >multiple attributes being used in the DN..

>> I am using openldap server 2.0.23. Binding with other
ldap-
>> clients works ....

>> >--
>> >Jason Robarts
>> >SDE/T - Active Directory Test Team

>> >This posting is provided "AS IS" with no warranties,
and
>> confers no rights.



>> >> Hello,

>> >> I am using VB6 and IADS and try to bind to a LDAP
>> >> directory.
>> >> the bind DN contains a multivalued rdn like:


>> >>         ^

>> >> Does anyone know how I can bind with such a rdn?

>> >> I get the error: "An invalid directory pathname was
>> passed"

>> >> ----- snip --------
>> >> Dim iadso As IADs

>> >> Set iadso =

myCustomerLDAP.iADsOpenDSObject.OpenDSObject
Quote:>> ( _

>> "LDAP://<server.<domain>.<topLevelDomain>:389/cn=User1+m
>> ail


- Show quoted text -

Quote:>> >> ,_
>> >> <adminN>,_
>> >> <pwd>,_
>> >> 0)
>> >> ---- snap ----

>> >.

>.

 
 
 

1. Reading Multivalued Attributes using ADSI

I am trying to append a UPN suffix to the upNSuffixes attribute located at
cn=Partitions,cn=Configuration,dc=test,dc=local. My script looks like:

<begin code sample>
Set
objUPN=GetObject("LDAP://cn=Partitions,cn=Configuration,dc=test,dc=local")
objUPN.Put "upNSuffixes", "newupn"
objUPN.SetInfo
<end code sample>

This resets the value to only read "newupn". I have tried using the Get
method to read the value and then just append the new UPN but it comes back
with a null value.

I tried doing this on other multivalued attributes and it does the same
thing.

Any ideas how I read multivalued attributes with ADSI.

Sean Fullerton

2. Explorer caused an invalid page fault

3. ADSI - LDAP - NDS - How to bind?

4. Excessive time during user open

5. Binding to User object using LDAP

6. statistics using fuzzy numbers

7. LDAP Bind using ASP - Please help

8. FS: Sun type 5c keyboards

9. Can't get attribute values using LDAP (using VB) to non-MS LDAP server

10. bind to object using adsi and asp.net/vb.net errors?

11. retrieving multivalued attribute from LDAP in C#??

12. How to query a non-Windows LDAP server using ADSI and vbscript

13. Query Using ADO, ADSI and LDAP