[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Searching on "ou"
>>> "Stephen C. Jensen" <Steve.Jensen@NASA.gov> 02/13/04 05:54pm >>>
More clarification...
The database includes these tags:
cn
sn
postalAddress
telephoneNumber
mail
userClass
uniqueIdentifier
I did several searches:
----------------------------------------------------------------------------------------------
o Search #1: first name starts with "S", last name starts with
"Jensen"
Hostname = ldap.dfrc.nasa.gov:389
filterCString = (&(cn=s*) (sn=jensen*))
BaseDN = o=National Aeronautics and Space Administration,c=US
This generates 4 "hits"
----------------------------------------------------------------------------------------------
o Search #2: Add "NASA" as a search term for userClass (userClass
includes the employer):
Hostname = ldap.dfrc.nasa.gov:389
filterCString = (&(cn=s*) (sn=jensen*) (userClass=*NASA*))
BaseDN = o=National Aeronautics and Space Administration,c=US
This generates 3 "hits" (1 of the previous hits was a contractor)
----------------------------------------------------------------------------------------------
o Next Search: First name "S", Last name "Jensen", "ou = Dryden"
added to BaseDN:
Hostname = ldap.dfrc.nasa.gov:389
filterCString = (&(cn=s*) (sn=jensen*))
BaseDN = ou=Dryden Flight Research Center,o=National Aeronautics and
Space Administration,c=US
1 result returned... as expected.
----------------------------------------------------------------------------------------------
o Next Search: First name "S", Last name "Jensen", ou = "Dryden"...
no results returned.
Hostname = ldap.dfrc.nasa.gov:389
filterCString = (&(cn=s*) (sn=jensen*) (ou=*Dryden*))
BaseDN = o=National Aeronautics and Space Administration,c=US
No results returned. I was hoping for the same result as the previous
search
----------------------------------------------------------------------------------------------
o Finally, I do a search with only "ou = Dryden", and here is the
result I get:
Hostname = ldap.dfrc.nasa.gov:389
filterCString = (ou=*Dryden*)
BaseDN = o=National Aeronautics and Space Administration,c=US
RESULTS:
tag: ou value: Dryden Flight Research Center
______________________________________
Does this help?
At 7:46 AM -0600 2/13/04, Craig Dunigan wrote:
>Actually, the exact search filter you're using would be more helpful.
>
>Craig
>
>On Fri, 13 Feb 2004, malini wrote:
>
>> Stephen,
>>
>> Can you give some details about your ldapsearch results
>>
>> regards
>> malini
>>
>> ----- Original Message -----
>> From: "Stephen C. Jensen" <Steve.Jensen@nasa.gov>
>> To: <openldap-software@OpenLDAP.org>
>> Sent: Friday, February 13, 2004 9:58 AM
>> Subject: Searching on "ou"
>>
>>
>> > Greetings...
>> >
>> > I have written a program which searches our LDAP database for
name
>> > and address info. I am in one division of a large company.
>> > Originally, I set the program with a baseDN of:
>> >
>> > o=BigCompanyName,ou=DivisionName,c=US
>> >
>> > Then, I got the idea of doing company-wide searches by just
deleting
>> > the "ou" term out of the base. So far so good. Then... I got the
idea
>> > of letting the user search for someone at a specific division.
Since
>> > the division name does not appear to be in any of the other
database
>> > fields, I added a search term for "ou=DivisionName"... doesn't
work.
>> > I know I am missing something simple... can anyone help?
> > >
> > > Thanks!!
> > >
> > > --
> > >
> > >
> > > Stephen C. Jensen
> > >
> > >
>> >
--
Stephen C. Jensen
X-37ALT DFRC Chief Engineer
Flight Systems Engineering Branch/Code RF
Dryden Flight Research Center
(661) 276-3841
<mailto:Stephen.C.Jensen@nasa.gov>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Hi Stephen.
For your filter to work as you seem to want it to, each person under
"ou=Dryden Flight Research Center,o=National Aeronautics and Space
Administration,c=US" would need an attribute of "ou=Dryden Flight
Research Center" in their entry. From what I understand about the
attributes in the entries, they do not have such an attribute, and so,
the LDAP server correctly tells you that there is no one in the branch
"ou=Dryden Flight Research Center,o=National Aeronautics and Space
Administration,c=US" with a cn attribute that starts with S and an sn
attribute that starts with Jensen and an ou attribute that contains
Dryden.
With your current attribute list, it seems that you would need to
include in your filter something along the lines that the dn (the fully
qualified dn, that is) contains Dryden to obtain the results you want.
Mike.