ldap-utils</a>) provides an utility called ldapsearch that can be used
to execute direct queries to the database. This is done by supplying
the following arguments to ldapsearch: <strong>-x -H
-ldap://db.debian.org -b dc=debian,dc=org</strong>. Alternatively, the
+ldaps://db.debian.org -b dc=debian,dc=org</strong>. Alternatively, the
<strong>-H</strong> and <strong>-b</strong> options can be put in
one's ~/.ldaprc, in the following form:
</p><pre>
[ dbharris@people: ~/ ]$ cat ~/.ldaprc
-HOST db.debian.org
+URI ldaps://db.debian.org
BASE dc=debian,dc=org
</pre>
return, all readable attributes are returned. While the example was quite
simple, complex queries can be performed as well:
</p><pre>
-[ dbharris@people: ~/ ]$ ldapsearch -x -H ldap://db.debian.org -b dc=debian,dc=org '(&(!(loginshell=/bin/bash))(uid=*))' loginshell
+[ dbharris@people: ~/ ]$ ldapsearch -x -H ldaps://db.debian.org -b dc=debian,dc=org '(&(!(loginshell=/bin/bash))(uid=*))' loginshell
</pre>
<p>
interesting queries are:</p>
<ul>
<li>Count the number of developers
-<tt>(&(keyfingerprint=*)(gidnumber=800))</tt></li>
+<tt>(&(keyfingerprint=*)(supplementaryGid=Debian))</tt></li>
<li>Show people in a certain group <tt>gidmembership=adm</tt></li>
<li>People named james <tt>cn=james</tt></li>
<li>Someone whos last name phonetically sounds like 'Ackerma'