
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Setting Up the Server
|
223
As you can see, slappasswd prompts you for a password and prints that password
hashed with the algorithm you specify with the
-h flag. Be sure to enclose this value
in curly brackets—see the slappasswd(8C) manpage for a list of valid choices. You
can copy and paste slappasswd’s output directly into slapd.conf, which is precisely
what I did to create the
rootpw value in Example 7-1.
Getting back to Example 7-1, the next parameter in this directory definition is
directory. Obviously enough, this specifies which directory on the local filesystem
your LDAP directory should be created in. Since /var is the customary place for
“growing” files like logs and databases, Example 7-1 shows a value of
/var/lib/ldap.
This directory must already exist, and you should make sure it’s owned by
OpenLDAP’s user and group (usually
ldap and ldap). Its permissions should be set to
0700 (-rwx------).
Technically, that’s enough to get started: you can try starting slapd via your ldap
startup script, most likely /etc/init.d/ldap, though this may vary between distribu-
tions. I encourage you to start adding practice entries to your LDAP database using
the ldapadd command; the Quick Start procedure I mentioned earlier shows how.
Before you begin managing and querying your LDAP database from ...