LDAP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesLDAP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 10th, 2006, 03:51 AM
shikomunin shikomunin is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 3 shikomunin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 m 14 sec
Reputation Power: 0
Question Search filter.

Hi, I'm trying to make a filter that list out all students which are member of a given group:

base = "ou=student,ou=person,o=shcool"
filter = "(groupMembership=group1)"

The problem is that groupMembership is a multivalue (consists of an array)

Example student:
cn=username
l=here
groupMembership = group1, group2, group3

I am able to get all students which is a member of any groups with (groupMembership=*) but when I try to narrow the search I'm not getting any students.

Anyone done something like this before?
Thanks...

Reply With Quote
  #2  
Old August 10th, 2006, 10:48 AM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Psycho Canadian
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jan 2001
Location: Canada
Posts: 4,820 Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 23 h 59 m 17 sec
Reputation Power: 630
Is the field groupMembership indexed? If it's not indexed I don't think it'll return what you want. But once indexed then yes your query should work fine.
__________________
Miscellaneous Software
Viper_SB
Developershed E-Support


Anyone else play chess?
Challenge me

Reply With Quote
  #3  
Old August 10th, 2006, 11:22 AM
shikomunin shikomunin is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 3 shikomunin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 m 14 sec
Reputation Power: 0
Tanks. I actually tried to search for group*, to get all the groups starting with certain characters, this did for some reason not work. But when I tried with the whole group name it did. Maybe it has something to do with the indexing.

Well, I got it working at last.
Thanks for the help anyways.

Reply With Quote
  #4  
Old August 10th, 2006, 02:52 PM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Psycho Canadian
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jan 2001
Location: Canada
Posts: 4,820 Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level)Viper_SB User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 23 h 59 m 17 sec
Reputation Power: 630
What do you have the field indexed as? If I remember right, different types of indexs allow different types of searches. If you want to search on group* you have to set the index as one thing, otherwise you have to search the full thing.

Reply With Quote
  #5  
Old August 10th, 2006, 02:58 PM
shikomunin shikomunin is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 3 shikomunin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 m 14 sec
Reputation Power: 0
Frankly I don't know. It's an off site server, and my LDAP skills are a bit limited. I'm just happy I got it working, so now I can complete the integration to the system I'm making.

Thanks again for your help.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesLDAP Programming > Search filter.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT