Doc fixes
[mirror/userdir-ldap.git] / web / doc-direct.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <HTML lang="en">
3 <HEAD>
4 <TITLE>Debian GNU/Linux -- Direct LDAP Access</TITLE>
5 <LINK REV="made" HREF="mailto:webmaster@debian.org">
6 <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
7 <META NAME="Description" CONTENT="Debian GNU/Linux is a free distribution of the GNU/Linux operating system. It is maintained and updated through the work of many users who volunteer their time and effort.">
8 <META NAME="Keywords" CONTENT="debian, GNU, linux, unix, open source, free, DFSG ">
9 <META NAME="Language" CONTENT="English">
10 <meta name="Author"    content="Debian Webmaster, webmaster@debian.org">
11 <meta name="Generator" content="WML 1.7.4 (06-Oct-1999)">
12 <meta name="Modified"  content="24-10-2000 23:43:55">
13 </HEAD>
14 <BODY text="#000000" bgcolor="#FFFFFF" link="#0000FF" vlink="#800080" alink="#FF0000">
15 <TABLE border="0" cellpadding="3" cellspacing="0" width="100%">
16 <TR>
17 <TD>
18 <A HREF="http://www.debian.org/logos/" BORDER="0"><IMG src="/Pics/logo-50.jpg" border="0" hspace="0" vspace="0" alt=""></A>
19 <IMG src="/Pics/debian.jpg" border="0" hspace="0" vspace="0" alt="Debian Project">
20 </TD>
21 </TR>
22 <TR>
23 <TD bgcolor="#DF0451">
24 <A href="http://www.debian.org/"><IMG src="/Pics/home.en.gif" border="0" hspace="2" vspace="3" alt="Home"></A>
25 <A href="http://www.debian.org/intro/about"><IMG src="/Pics/about.en.gif" border="0" hspace="2" vspace="3" alt="About&nbsp;Debian"></A>
26 <A href="http://www.debian.org/News/"><IMG src="/Pics/news.en.gif" border="0" hspace="2" vspace="3" alt="News"></A>
27 <A href="http://www.debian.org/distrib/"><IMG src="/Pics/distrib.en.gif" border="0" hspace="2" vspace="3" alt="Distribution"></A>
28 <A href="http://www.debian.org/support"><IMG src="/Pics/support.en.gif" border="0" hspace="2" vspace="3" alt="Support"></A>
29 <A href="http://www.debian.org/devel/"><IMG src="/Pics/devel.en.gif" border="0" hspace="2" vspace="3" alt="Developers'&nbsp;Corner"></A>
30 <A href="http://www.debian.org/search"><IMG src="/Pics/search.en.gif" border="0" hspace="2" vspace="3" alt="Search"></A>
31 </TD>
32 </TR>
33 </TABLE>
34 <H1>Direct LDAP Access</H1>
35 <p>
36 The LDAP utilities package provides a program called ldapsearch that can be
37 used to execute direct queries to the database. Generally this is done by
38 putting
39 <pre>
40 HOST db.debian.org
41 BASE dc=debian,dc=org
42 </pre>
43 in ~/.ldaprc. Then queries can be performed, for instance
44 <pre>
45 samosa{jgg}~#ldapsearch uid=wakkerma keyfingerprint
46 uid=wakkerma,ou=users,dc=debian,dc=org
47 keyfingerprint=38444C2CA6AD756EB4A2E5FA612AFF59
48 keyfingerprint=576E100B518D2F1636B028053CB892502FA3BC2D
49 </pre>
50 Shows the PGP key finger prints for the <tt>wakkerma</tt> user. The first word
51 in the command is the query to perform, the rest of command line are the
52 attributes to return, if omitted then all readable attributes are returned.
53 More complicated queries are possible, for instance:
54 <pre>
55 samosa{jgg}~#ldapsearch '(&(!(loginshell=/bin/bash))(uid=*))' loginshell
56 uid=admin,ou=users,dc=debian,dc=org
57
58 uid=mryan,ou=users,dc=debian,dc=org
59 loginshell=/usr/bin/tcsh
60
61 uid=jkominek,ou=users,dc=debian,dc=org
62 loginshell=/usr/bin/zsh
63
64 uid=caelum,ou=users,dc=debian,dc=org
65 loginshell=/usr/bin/zsh
66 [..]
67 </pre>
68 Shows users that do not use bash as their shell. Some other interesting
69 queries are:
70 <ul>
71 <li>Count the number of developers <tt>(&(keyfingerprint=*)(gidnumber=800))</tt>
72 <li>Show people in a certain group <tt>gidmembership=adm</tt>
73 <li>People named james <tt>cn=james</tt>
74 <li>Someone whos last name phonetically sounds like 'Ackerma' <tt>sn~=ackerm</tt>
75 <li>All the sparcs <tt>host=sparc</tt>
76 </ul>
77 <a href="http://info.internet.isi.edu:80/in-notes/rfc/files/rfc2254.txt">RFC 2254</a>
78 has more information about the filter expressions.
79 <h1>Other LDAP Browsers</h1>
80 <p>
81 The GQ package has a graphical LDAP browser that can browse the debian.org
82 tree. It is somewhat ungainly with the large number of entries in our
83 directory, but it does work nonetheless. Configuration is similar, use the
84 preferences dialog to add a new host with the information given above.
85 <p>
86 Netscape has a browser for their mailer, but I have never been able to get
87 it to work, please email if you have any luck.
88 <p>
89 To my knowledge there are no interfaces for popular mailers like mutt and
90 gnus. Such an interface would allow using the directory as an enhanced address
91 book.
92 <HR>
93 <P>Back to the <A href="http://www.debian.org/">Debian Project homepage</A>.
94 <HR>
95 <SMALL>You can contact us at <A href="mailto:admin@db.debian.org">admin@db.debian.org</A>.</SMALL><P>
96 <SMALL>Last Modified: Wed, Oct 25 05:43:55 UTC 2000<BR>
97 Copyright &copy; 1997-1999 <A href="http://www.spi-inc.org/">SPI</A>; See <A href="http://www.debian.org/license">license terms</A>
98         
99          </SMALL>
100 </BODY>
101 </HTML>