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:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old February 8th, 2008, 05:38 PM
hanji hanji is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 257 hanji User rank is Sergeant Major (2000 - 5000 Reputation Level)hanji User rank is Sergeant Major (2000 - 5000 Reputation Level)hanji User rank is Sergeant Major (2000 - 5000 Reputation Level)hanji User rank is Sergeant Major (2000 - 5000 Reputation Level)hanji User rank is Sergeant Major (2000 - 5000 Reputation Level)hanji User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Day 15 h 9 m 29 sec
Reputation Power: 30
Filter Question - Wildcard search in memberOf

Hello All

I'm stuck with a filter search problem. I need to be able to write a simple LDAP filter that will search through groups on wildcard match? For instance, if the group has 'VPN' in the dn, I'll want to get that user?

Basically, I want to do something like:

Code:
(memberOf=cn=*VPN*)


This obviously doesn't work. I'm guessing since it's not a really a string like cn=bob*.

Any ideas?

Thanks!
hanji

Reply With Quote
  #2  
Old February 9th, 2008, 12:38 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,739 Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 4 Weeks 6 h 25 m 16 sec
Reputation Power: 384
to use * in your filter, that field must be indexed, by default I don't think memberOf is, if you can index it then it should work fine.

Reply With Quote
  #3  
Old February 9th, 2008, 12:40 PM
hanji hanji is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 257 hanji User rank is Sergeant Major (2000 - 5000 Reputation Level)hanji User rank is Sergeant Major (2000 - 5000 Reputation Level)hanji User rank is Sergeant Major (2000 - 5000 Reputation Level)hanji User rank is Sergeant Major (2000 - 5000 Reputation Level)hanji User rank is Sergeant Major (2000 - 5000 Reputation Level)hanji User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Day 15 h 9 m 29 sec
Reputation Power: 30
Quote:
Originally Posted by Viper_SB
to use * in your filter, that field must be indexed, by default I don't think memberOf is, if you can index it then it should work fine.


So indexing memberOf is possible? I'll start looking on the procedure.

Thanks!
hanji

Reply With Quote
  #4  
Old February 10th, 2008, 02:25 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,739 Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 4 Weeks 6 h 25 m 16 sec
Reputation Power: 384
are you using Active directory? if so I have no idea how to do it there, but in Open LDAP yes you can index it

Reply With Quote
  #5  
Old February 19th, 2008, 07:25 AM
harinath_d harinath_d is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 6 harinath_d User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 51 m 57 sec
Reputation Power: 0
$filter="cn=VPN*";
USE THIS CODE IT WOULD SURELY WORK

Reply With Quote
  #6  
Old February 19th, 2008, 08:06 AM
hanji hanji is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 257 hanji User rank is Sergeant Major (2000 - 5000 Reputation Level)hanji User rank is Sergeant Major (2000 - 5000 Reputation Level)hanji User rank is Sergeant Major (2000 - 5000 Reputation Level)hanji User rank is Sergeant Major (2000 - 5000 Reputation Level)hanji User rank is Sergeant Major (2000 - 5000 Reputation Level)hanji User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Day 15 h 9 m 29 sec
Reputation Power: 30
Quote:
Originally Posted by harinath_d
$filter="cn=VPN*";
USE THIS CODE IT WOULD SURELY WORK


Hello

Thanks for the reply. This does not work. This will return the group containers.. but I need to know the members that are members of these groups. We're going to be working on indexing memberOf on the test AD server this week.. hopefully.

Thanks!
hanji

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesLDAP Programming > Filter Question - Wildcard search in memberOf


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!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

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





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway