Page 1 of 1 1
Topic Options
#146800 - 2005-08-30 06:02 PM Enumerate groups
StormKix Offline
Lurker

Registered: 2005-08-15
Posts: 3
Hi, I want to enumerate only the groups that contain admin in their name... How is this possible?
Top
#146801 - 2005-08-30 06:53 PM Re: Enumerate groups
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Local groups or on your domain?
Top
#146802 - 2005-08-30 07:00 PM Re: Enumerate groups
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: CA
Strictly speaking it's not possible as any function would need to enumerate ALL the groups first to make sure what the name is. You don't have to return the data of all of them though.
Top
#146803 - 2005-08-30 07:18 PM Re: Enumerate groups
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Quote:

Strictly speaking it's not possible as any function would need to enumerate ALL the groups first to make sure what the name is. You don't have to return the data of all of them though.




It is possible to perform this quickly and efficiently using an LDAP query (if he is looking for all the groups with 'admin' in the name from a domain).

The filter for fnLDAPQuery() would look like...

Code:
$sFilter = "(&(objectClass=group)(name=*admin*))"


Top
#146804 - 2005-08-30 10:55 PM Re: Enumerate groups
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: CA
Yes, but it would still have to query ALL the groups in order to determine if Admin was in the name.

Sort of like

I have 100 unknown cars, please tell me which ones are RED without looking at them first.

He would never see it happen as it would all be handled under covers so to speak, but none the less, all groups would be queried as to what their names are.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 661 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.052 seconds in which 0.025 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org