you can use ldapsearch, as follows:
Click here to view code image
matthew@seymour:~$ ldapsearch -xLLL -b "dc=example,dc=com" uid=john
sn givenName cn
dn: uid=matthew,ou=people,dc=matthewhelmke,dc=com
cn: Matthew Helmke
sn: Helmke
givenName: Matthew
In this example, dn stands for distinguished name, uid refers to user
identification, ou is the organizational unit, dc represents domain
component, cn is common name, sn is the family or surname, and many
cultures know givenName as your first name.
When you use LDAP, you can organize your data in many ways. You can use
a number of currently existing schemas, such as in the previous example
using the LDIF files you loaded at the start, or you can write your own. The
/etc/ldap/schemas directory has many fine examples in the files with a
.schema suffix and a few that have been converted to LDAP Data
Interchange Format (LDIF). To be used with LDAP, a file must be an LDIF
file (with the .ldif filename extension). You can convert one of the sample
schemas or create your own schema.
Configuring Clients
Although Ubuntu comes with a selection of email clients, there is not enough
room here to cover them all. The two most frequently used clients are
Thunderbird, the default, and Evolution. Both are powerful messaging
solutions, and both work well with LDAP. Of the two, Thunderbird seems to
be the easier to configure and, as the default, is the one we choose to show
here.
To enable Thunderbird to use LDAP, go to the menu, click Preferences, and
then select Composition from the tabs along the top.
From the Addressing subtab, check the Directory Server box and click the
Edit Directories button to its right. In the dialog box that appears, click Add to
add a new directory. You can give it any name you want because this is
merely for display purposes. As shown in Figure 37.1, set the Hostname field
to be the IP address of your LDAP server (or 127.0.0.1 if you are working
on the server). Set the Base DN field to the DN for your address book (for
instance, ou=People,dc=matthewhelmke,dc=com) and leave Port