Binding AD only for spesific object attributes returns more than specified......

Binding AD only for spesific object attributes returns more than specified......

Post by Audu » Wed, 04 Dec 2002 03:55:18



The logonscript maps disks -etc. based on the info field
of the group's that the user is a member of.
(in that way I can change drive mappings for a group in
AD - genius if you ask me :=)

To keep the bandwith usage down I try to retrive only the
spesific attributes I need for a group, but no success so
far. I also get several other attributes back.

Since we got 18.000 users in our domain, some of our
groups have several hundred members.
Added up for all groups a user is a member of, this is a
lot of unnecessary network traffic 300 - 800 kb or more pr
user at logon.

Anyone ?

Please notify me at:

My latest code:

Dim dso As IADsOpenDSObject
Dim oGroup as IADS
Set dso = GetObject("LDAP:")

Set oGroup = dso.OpenDSObject(GroupAdsPath, vbNullString,
vbNullString, ADS_SECURE_AUTHENTICATION Or ADS_FAST_BIND)

oGroup.GetInfoEx Array
("Adspath", "Name", "memberof", "info"), 0

    sGroupMembersof = oGroup.memberof
    sInfo = oGroup.info
    sGroupAdspath = oGroup.ADsPath
    sGroup = oGroup.Name

 
 
 

Binding AD only for spesific object attributes returns more than specified......

Post by Weiqing Tu [MS » Fri, 06 Dec 2002 11:11:12


GetInfoEx call should only return the attributes that you ask for. What are
the additional attributes that are returned back? Could you elaborate it?

weiqing tu

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


> The logonscript maps disks -etc. based on the info field
> of the group's that the user is a member of.
> (in that way I can change drive mappings for a group in
> AD - genius if you ask me :=)

> To keep the bandwith usage down I try to retrive only the
> spesific attributes I need for a group, but no success so
> far. I also get several other attributes back.

> Since we got 18.000 users in our domain, some of our
> groups have several hundred members.
> Added up for all groups a user is a member of, this is a
> lot of unnecessary network traffic 300 - 800 kb or more pr
> user at logon.

> Anyone ?

> Please notify me at:

> My latest code:

> Dim dso As IADsOpenDSObject
> Dim oGroup as IADS
> Set dso = GetObject("LDAP:")

> Set oGroup = dso.OpenDSObject(GroupAdsPath, vbNullString,
> vbNullString, ADS_SECURE_AUTHENTICATION Or ADS_FAST_BIND)

> oGroup.GetInfoEx Array
> ("Adspath", "Name", "memberof", "info"), 0

>     sGroupMembersof = oGroup.memberof
>     sInfo = oGroup.info
>     sGroupAdspath = oGroup.ADsPath
>     sGroup = oGroup.Name


 
 
 

Binding AD only for spesific object attributes returns more than specified......

Post by Audu » Fri, 13 Dec 2002 20:49:14


The members attribute of the group object is returned, and
since we have nearly 20.000 users in our domain, some
groups have thousands of members.

This generates a lot of unnecessarily network traffic ..

Audun

>-----Original Message-----
>GetInfoEx call should only return the attributes that you
ask for. What are
>the additional attributes that are returned back? Could
you elaborate it?

>weiqing tu

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



>> The logonscript maps disks -etc. based on the info field
>> of the group's that the user is a member of.
>> (in that way I can change drive mappings for a group in
>> AD - genius if you ask me :=)

>> To keep the bandwith usage down I try to retrive only
the
>> spesific attributes I need for a group, but no success
so
>> far. I also get several other attributes back.

>> Since we got 18.000 users in our domain, some of our
>> groups have several hundred members.
>> Added up for all groups a user is a member of, this is a
>> lot of unnecessary network traffic 300 - 800 kb or more
pr
>> user at logon.

>> Anyone ?

>> Please notify me at:

>> My latest code:

>> Dim dso As IADsOpenDSObject
>> Dim oGroup as IADS
>> Set dso = GetObject("LDAP:")

>> Set oGroup = dso.OpenDSObject(GroupAdsPath,
vbNullString,
>> vbNullString, ADS_SECURE_AUTHENTICATION Or
ADS_FAST_BIND)

>> oGroup.GetInfoEx Array
>> ("Adspath", "Name", "memberof", "info"), 0

>>     sGroupMembersof = oGroup.memberof
>>     sInfo = oGroup.info
>>     sGroupAdspath = oGroup.ADsPath
>>     sGroup = oGroup.Name

>.

 
 
 

Binding AD only for spesific object attributes returns more than specified......

Post by Weiqing Tu [MS » Wed, 18 Dec 2002 02:50:57


One thing that probably happens here is the attributes that you use
GetInfoEx to fetech might not be set on the object. So when you try to
retrieve it back, it is not in the cache, so ADSI probably did an implicit
GetInfo for you, so in turn you get the other attributes back. Could you
check whether it is the case? In this scenario, ADSI should not do an
implicit GetInfo if GetInfoEx call fails to get the attribute back, but this
issue should have been fixed in win2k sp3 and on XP. What OS are you running
on?

weiqing tu

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


> The members attribute of the group object is returned, and
> since we have nearly 20.000 users in our domain, some
> groups have thousands of members.

> This generates a lot of unnecessarily network traffic ..

> Audun

> >-----Original Message-----
> >GetInfoEx call should only return the attributes that you
> ask for. What are
> >the additional attributes that are returned back? Could
> you elaborate it?

> >weiqing tu

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



> >> The logonscript maps disks -etc. based on the info field
> >> of the group's that the user is a member of.
> >> (in that way I can change drive mappings for a group in
> >> AD - genius if you ask me :=)

> >> To keep the bandwith usage down I try to retrive only
> the
> >> spesific attributes I need for a group, but no success
> so
> >> far. I also get several other attributes back.

> >> Since we got 18.000 users in our domain, some of our
> >> groups have several hundred members.
> >> Added up for all groups a user is a member of, this is a
> >> lot of unnecessary network traffic 300 - 800 kb or more
> pr
> >> user at logon.

> >> Anyone ?

> >> Please notify me at:

> >> My latest code:

> >> Dim dso As IADsOpenDSObject
> >> Dim oGroup as IADS
> >> Set dso = GetObject("LDAP:")

> >> Set oGroup = dso.OpenDSObject(GroupAdsPath,
> vbNullString,
> >> vbNullString, ADS_SECURE_AUTHENTICATION Or
> ADS_FAST_BIND)

> >> oGroup.GetInfoEx Array
> >> ("Adspath", "Name", "memberof", "info"), 0

> >>     sGroupMembersof = oGroup.memberof
> >>     sInfo = oGroup.info
> >>     sGroupAdspath = oGroup.ADsPath
> >>     sGroup = oGroup.Name

> >.

 
 
 

Binding AD only for spesific object attributes returns more than specified......

Post by Audu » Wed, 18 Dec 2002 03:43:26


This could be the case.
Not all groups that I bind to has all attributes set.

On my test machine I'm running W2K with sp2.
I will install SP3, and see if it fixes the problem.

Thanx a lot !!

Audun

Quote:>-----Original Message-----
>One thing that probably happens here is the attributes
that you use
>GetInfoEx to fetech might not be set on the object. So
when you try to
>retrieve it back, it is not in the cache, so ADSI

probably did an implicit
Quote:>GetInfo for you, so in turn you get the other attributes
back. Could you
>check whether it is the case? In this scenario, ADSI
should not do an
>implicit GetInfo if GetInfoEx call fails to get the

attribute back, but this
>issue should have been fixed in win2k sp3 and on XP. What
OS are you running
>on?

>weiqing tu

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



>> The members attribute of the group object is returned,
and
>> since we have nearly 20.000 users in our domain, some
>> groups have thousands of members.

>> This generates a lot of unnecessarily network traffic ..

>> Audun

>> >-----Original Message-----
>> >GetInfoEx call should only return the attributes that
you
>> ask for. What are
>> >the additional attributes that are returned back? Could
>> you elaborate it?

>> >weiqing tu

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



>> >> The logonscript maps disks -etc. based on the info
field
>> >> of the group's that the user is a member of.
>> >> (in that way I can change drive mappings for a group
in
>> >> AD - genius if you ask me :=)

>> >> To keep the bandwith usage down I try to retrive only
>> the
>> >> spesific attributes I need for a group, but no
success
>> so
>> >> far. I also get several other attributes back.

>> >> Since we got 18.000 users in our domain, some of our
>> >> groups have several hundred members.
>> >> Added up for all groups a user is a member of, this
is a
>> >> lot of unnecessary network traffic 300 - 800 kb or
more
>> pr
>> >> user at logon.

>> >> Anyone ?

>> >> Please notify me at:

>> >> My latest code:

>> >> Dim dso As IADsOpenDSObject
>> >> Dim oGroup as IADS
>> >> Set dso = GetObject("LDAP:")

>> >> Set oGroup = dso.OpenDSObject(GroupAdsPath,
>> vbNullString,
>> >> vbNullString, ADS_SECURE_AUTHENTICATION Or
>> ADS_FAST_BIND)

>> >> oGroup.GetInfoEx Array
>> >> ("Adspath", "Name", "memberof", "info"), 0

>> >>     sGroupMembersof = oGroup.memberof
>> >>     sInfo = oGroup.info
>> >>     sGroupAdspath = oGroup.ADsPath
>> >>     sGroup = oGroup.Name

>> >.

>.

 
 
 

Binding AD only for spesific object attributes returns more than specified......

Post by Audu » Wed, 18 Dec 2002 09:25:55


Yepp

Now everything works like a dream !!
Thanx you !

Sincerly

Audun

>-----Original Message-----
>This could be the case.
>Not all groups that I bind to has all attributes set.

>On my test machine I'm running W2K with sp2.
>I will install SP3, and see if it fixes the problem.

>Thanx a lot !!

>Audun

>>-----Original Message-----
>>One thing that probably happens here is the attributes
>that you use
>>GetInfoEx to fetech might not be set on the object. So
>when you try to
>>retrieve it back, it is not in the cache, so ADSI
>probably did an implicit
>>GetInfo for you, so in turn you get the other attributes
>back. Could you
>>check whether it is the case? In this scenario, ADSI
>should not do an
>>implicit GetInfo if GetInfoEx call fails to get the
>attribute back, but this
>>issue should have been fixed in win2k sp3 and on XP.
What
>OS are you running
>>on?

>>weiqing tu

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



>>> The members attribute of the group object is returned,
>and
>>> since we have nearly 20.000 users in our domain, some
>>> groups have thousands of members.

>>> This generates a lot of unnecessarily network
traffic ..

>>> Audun

>>> >-----Original Message-----
>>> >GetInfoEx call should only return the attributes that
>you
>>> ask for. What are
>>> >the additional attributes that are returned back?
Could
>>> you elaborate it?

>>> >weiqing tu

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



>>> >> The logonscript maps disks -etc. based on the info
>field
>>> >> of the group's that the user is a member of.
>>> >> (in that way I can change drive mappings for a
group
>in
>>> >> AD - genius if you ask me :=)

>>> >> To keep the bandwith usage down I try to retrive
only
>>> the
>>> >> spesific attributes I need for a group, but no
>success
>>> so
>>> >> far. I also get several other attributes back.

>>> >> Since we got 18.000 users in our domain, some of our
>>> >> groups have several hundred members.
>>> >> Added up for all groups a user is a member of, this
>is a
>>> >> lot of unnecessary network traffic 300 - 800 kb or
>more
>>> pr
>>> >> user at logon.

>>> >> Anyone ?

>>> >> Please notify me at:

>>> >> My latest code:

>>> >> Dim dso As IADsOpenDSObject
>>> >> Dim oGroup as IADS
>>> >> Set dso = GetObject("LDAP:")

>>> >> Set oGroup = dso.OpenDSObject(GroupAdsPath,
>>> vbNullString,
>>> >> vbNullString, ADS_SECURE_AUTHENTICATION Or
>>> ADS_FAST_BIND)

>>> >> oGroup.GetInfoEx Array
>>> >> ("Adspath", "Name", "memberof", "info"), 0

>>> >>     sGroupMembersof = oGroup.memberof
>>> >>     sInfo = oGroup.info
>>> >>     sGroupAdspath = oGroup.ADsPath
>>> >>     sGroup = oGroup.Name

>>> >.

>>.

>.

 
 
 

1. Binding to an AD object using SID

Greetings,

I wish to bind to an AD object using its SID. I have seen a sample in MSDN
which binds using this sytax: LDAP://<SID=xxxx>. My problem is that the SID
I have is in binary form. I tried encoding it using ADsEncodeBinaryData, but
ADSOpenObject does not accept it.

So my question is, how do I convert a binary SID to a textutal
representation that I can use with  LDAP://<SID=xxxx>?

Thanks,

James

2. C/C++ libraries needed!te games

3. Change user object attribute on all users in AD domain

4. How to implement Custom Window dragging

5. Changing "memberOf" attribute of an ADS object

6. VERY unusual networking question

7. Specify IP address Exchange binds to?

8. pro/e vs solid designer (cocrate)

9. smbd binds, but never returns from select

10. Bind to Deleted Objects Container

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

12. Bind to current computer object using VBScript