<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
-------- Original Message --------
<table border="0" cellpadding="0" cellspacing="0">
  <tbody>
    <tr>
      <th align="right" nowrap="nowrap" valign="baseline">Subject: </th>
      <td>Re: [LDAP-interop] LDAPv3 NOT search filter behavior</td>
    </tr>
    <tr>
      <th align="right" nowrap="nowrap" valign="baseline">Resent-Date: </th>
      <td>Fri, 1 Jul 2005 17:33:29 +0000 (GMT)</td>
    </tr>
    <tr>
      <th align="right" nowrap="nowrap" valign="baseline">Resent-From: </th>
      <td><a class="moz-txt-link-abbreviated" href="mailto:richm@stanfordalumni.org">richm@stanfordalumni.org</a></td>
    </tr>
    <tr>
      <th align="right" nowrap="nowrap" valign="baseline">Date: </th>
      <td>Fri, 01 Jul 2005 12:33:26 -0500</td>
    </tr>
    <tr>
      <th align="right" nowrap="nowrap" valign="baseline">From: </th>
      <td>Benjamin Lewis <a class="moz-txt-link-rfc2396E" href="mailto:bhlewis@purdue.edu">&lt;bhlewis@purdue.edu&gt;</a></td>
    </tr>
    <tr>
      <th align="right" nowrap="nowrap" valign="baseline">To: </th>
      <td><a class="moz-txt-link-abbreviated" href="mailto:richm@stanfordalumni.org">richm@stanfordalumni.org</a>, OpenLDAP interoperability list
<a class="moz-txt-link-rfc2396E" href="mailto:ldap-interop@fini.net">&lt;ldap-interop@fini.net&gt;</a></td>
    </tr>
    <tr>
      <th align="right" nowrap="nowrap" valign="baseline">CC: </th>
      <td><a class="moz-txt-link-abbreviated" href="mailto:quanah@stanford.edu">quanah@stanford.edu</a></td>
    </tr>
  </tbody>
</table>
<br>
<br>
<pre>On July 1 2005, Rich Megginson wrote:

&gt; What happens if you specify the uid attribute to be returned?

The uid attribute is returned for those entries that have one.

&gt; ldapsearch "(!(uid=quanah))" uid
&gt; ?  Does it return only those entries that have a uid attribute?  Does 
&gt; OpenLDAP omit entries from the search results that match the search 
&gt; filter but do not contain the attribute listed in the attribute list in 
&gt; the search request?

No.  You might use something like '(&amp;(uid=*)(!(uid=quanah)))' to
return only the entries that have a uid attribute.  It would probably
be better to use objectClass to restrict the search to the type of
objects you're looking for.  Perhaps something like
'(&amp;(objectclass=posixAccount)(!(uid=quanah)))'.

-Ben

-- 
Benjamin Lewis <a class="moz-txt-link-rfc2396E" href="mailto:bhlewis@purdue.edu">&lt;bhlewis@purdue.edu&gt;</a>
Security Analyst, Identity and Access Management
IT Security and Privacy
Purdue University


</pre>
</body>
</html>