Return-Path: X-Original-To: apmail-directory-users-archive@www.apache.org Delivered-To: apmail-directory-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 692729DD4 for ; Mon, 17 Oct 2011 12:33:40 +0000 (UTC) Received: (qmail 23252 invoked by uid 500); 17 Oct 2011 12:33:40 -0000 Delivered-To: apmail-directory-users-archive@directory.apache.org Received: (qmail 23229 invoked by uid 500); 17 Oct 2011 12:33:40 -0000 Mailing-List: contact users-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@directory.apache.org Delivered-To: mailing list users@directory.apache.org Received: (qmail 23221 invoked by uid 99); 17 Oct 2011 12:33:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Oct 2011 12:33:40 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of elecharny@gmail.com designates 209.85.215.178 as permitted sender) Received: from [209.85.215.178] (HELO mail-ey0-f178.google.com) (209.85.215.178) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Oct 2011 12:33:33 +0000 Received: by eye13 with SMTP id 13so3046073eye.37 for ; Mon, 17 Oct 2011 05:33:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=djYddbUPASJ00yxpdIiNSZcpMWVWBxMq7k+X838nRD8=; b=FxrcJOqswEdUsCDZE7QFkkKpCZp622zE00+ZG7gDkE/2xk90cMO7kWdSgWGf39+0AR SRGOIC2DV9V5Q/fkAhagoewzE41QZ7qy4O6XjdAp6QUtPsYIRxr51cAWamcDx5didfr2 EC39TWAkfT9BEn0OKtmauTJ/vFg3p7jGCisyU= Received: by 10.216.131.12 with SMTP id l12mr731233wei.95.1318854792085; Mon, 17 Oct 2011 05:33:12 -0700 (PDT) Received: from emmanuel-lecharnys-MacBook-Pro.local (lon92-10-78-226-4-211.fbx.proxad.net. [78.226.4.211]) by mx.google.com with ESMTPS id es5sm30850816wbb.11.2011.10.17.05.33.10 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 17 Oct 2011 05:33:11 -0700 (PDT) Message-ID: <4E9C2086.8070500@gmail.com> Date: Mon, 17 Oct 2011 14:33:10 +0200 From: Emmanuel Lecharny Reply-To: elecharny@apache.org User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: users@directory.apache.org Subject: Re: search not working as expected References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 10/17/11 2:29 PM, david jones wrote: > can anyone tell me why this search is not working for name=USERID (or any > other search on name i've tried. I thought initially it might have something > to do with case, but does not appear to be) > > code (1.5.5): > > filter = FilterParser.parse("(&(ou=bofmusers)(name="+name+"))"); > cursor = service.getAdminSession().search(new > LdapDN("ou=system") , SearchScope.SUBTREE , filter, > AliasDerefMode.DEREF_ALWAYS, null); > > // Find a matching entry by name > while ( cursor.next() ) > ....... > > > exported ldif: > > dn: uid=6eaae748-92c3-43d7-8e46-1c5f805d70ff,ou=bofmusers,ou=system > > objectClass: bofmUsers > > objectClass: top > > cn: 6eaae748-92c3-43d7-8e46-1c5f805d70ff > > member: ou=bofmusers,ou=system > > name: USERID > > ou: ou=bofmusers,ou=system > > ou: bofmusers > > uid: 6eaae748-92c3-43d7-8e46-1c5f805d70ff > > > > I've got the ldap debug trace, but i think its too long to append. (name="+name+") will not match anything. The server will try to fin the exact '+name+' string into the name Attribute, and obviosuly won't find it. I don't know what you are trying to do with the '+name+' notation, but this is invalid. -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com