07.06.2014 Views

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

11.7.1. Installing<br />

The slapd package contains the OpenLDAP server. The ldap-utils package includes command-line<br />

tools for interacting with LDAP servers.<br />

Installing slapd normally asks a few debconf questions; this configuration phase can be forced<br />

by the dpkg-reconfigure slapd command.<br />

• Omit OpenLDAP server configuration? No, of course, we want to configure this service.<br />

• DNS domain name: “falcot.com”.<br />

• Organization name: “Falcot Corp”.<br />

• An administrative passwords needs to be typed in.<br />

• Database backend to use: “HDB”.<br />

• Do you want the database to be removed when slapd is purged? No. No point in risking<br />

losing the database in case of a mistake.<br />

• Move old database? This question is only asked when the configuration is attempted while<br />

a database already exists. Only answer “yes” if you actually want to start again from a<br />

clean database, for instance if you run dpkg-reconfigure slapd right after the initial<br />

installation.<br />

• Allow LDAPv2 protocol? No, there's no point in that. All the tools we're going to use<br />

understand the LDAPv3 protocol.<br />

BACK TO BASICS<br />

LDIF format<br />

An LDIF file (LDAP Data Interchange Format) is a portable text file describing<br />

the contents of an LDAP database (or a portion thereof); this can then be used<br />

to inject the data into any other LDAP server.<br />

A minimal database is now configured, as demonstrated by the following query:<br />

$ ldapsearch -x -b dc=falcot,dc=com<br />

# extended LDIF<br />

#<br />

# LDAPv3<br />

# base with scope sub<br />

# filter: (objectclass=*)<br />

# requesting: ALL<br />

#<br />

# falcot.com<br />

dn: dc=falcot,dc=com<br />

objectClass: top<br />

288 The Debian Administrator's Handbook

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!