[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: search on a DN typed attribute



"Michaël Parienti" wrote:
> 
> Hi
> 
> I would like to perform a search on an attribute which is a
> 'DN attribute'. Here is a subset of my schema:
> 
> attributetype ( 1.3.6.1.4.1.10650.2.10.0.0.27.2.1.3 NAME ( 'eeadminattach' )
>         SYNTAX 1.3.6.1.4.1.1466.115.121.1.12
>         SINGLE-VALUE )
> 
> objectclass ( 1.3.6.1.4.1.10650.2.10.0.0.27.2.2.1 NAME 'eeperson' SUP person STRUCTURAL
>         MAY ( gn $ mail $ title $ eeadminattach ) )
> 
> The attribute 'eeadminattach' is the DN of another entry in
> my directory.
> 
> Now, I want to get all the people whose 'eeadminattach' has
> the following DN: 'cn=Ouest,dc=easter-eggs,dc=com'. How do I
> write the filter to perform this search ?
> 
> I tried:
> p5adminattach=cn=Ouest,dc=easter-eggs,dc=com
> p5adminattach=cn=Ouest\,dc=easter-eggs\,dc=com

According to your mail, you are using a wrong attribute type;
you should filter for

'(eeadminattach=cn=Ouest,dc=easter-eggs,dc=com)'

I guess commas are separating rdns, so you don't need to escape
them. Note that if you use

"attr=value\,attr=value"

it is likely the shell is eating your escapes; you'd rather use

'attr=value\,attr=value'

Pierangelo.

-- 
Dr. Pierangelo Masarati               | voice: +39 02 2399 8309
Dip. Ing. Aerospaziale                | fax:   +39 02 2399 8334
Politecnico di Milano                 | mailto:masarati@aero.polimi.it
via La Masa 34, 20156 Milano, Italy   |
http://www.aero.polimi.it/~masarati