From owner-freebsd-questions@FreeBSD.ORG Mon Jan 19 03:45:22 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6140010656C3 for ; Mon, 19 Jan 2009 03:45:22 +0000 (UTC) (envelope-from jhall@socket.net) Received: from mf5.socket.net (mf5b.socket.net [216.106.26.210]) by mx1.freebsd.org (Postfix) with ESMTP id 4205F8FC26 for ; Mon, 19 Jan 2009 03:45:22 +0000 (UTC) (envelope-from jhall@socket.net) Received: from [10.129.40.202] (216.106.31.239.reverse.socket.net [216.106.31.239]) by mf5.socket.net (Postfix) with ESMTP id 5E4C959241 for ; Sun, 18 Jan 2009 21:45:21 -0600 (CST) Message-Id: From: Jay Hall To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Sun, 18 Jan 2009 21:44:45 -0600 X-Mailer: Apple Mail (2.929.2) Subject: ldapsearch question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 03:45:22 -0000 I am running the following against an Active Directory server. ldapsearch -D "cn=admin_user,cn=users,dc=xx,dc=com" -x -w "password" - h 10.129.10.42 -p 3268 -b 'dc=abc,dc=com' -s sub '(! (objectclass=computer))' '(!(mail=*))' dn mail I am trying to return only objects for which the mail attribute is defined. I think my search is incorrect, and I am searching for the mail attribute being null. Any suggestions would be greatly appreciated. Thanks, Jay