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.

objectClass: dcObject<br />

objectClass: organization<br />

o: Falcot Corp<br />

dc: falcot<br />

# admin, falcot.com<br />

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

objectClass: simpleSecurityObject<br />

objectClass: organizationalRole<br />

cn: admin<br />

description: LDAP administrator<br />

# search result<br />

search: 2<br />

result: 0 Success<br />

# numResponses: 3<br />

# numEntries: 2<br />

The query returned two objects: the organization itself, and the administrative user.<br />

11.7.2. Filling in the Directory<br />

Since an empty database is not particularly useful, we're going to inject into it all the existing<br />

directories; this includes the users, groups, services and hosts databases.<br />

The migrationtools package provides a set of scripts dedicated to extract data from the standard<br />

Unix directories (/etc/passwd, /etc/group, /etc/services, /etc/hosts and so on), convert<br />

this data, and inject it into the LDAP database.<br />

Once the package is installed, the /etc/migrationtools/migrate_common.ph must be edited;<br />

the IGNORE_UID_BELOW and IGNORE_GID_BELOW options need to be enabled (uncommenting<br />

them is enough).<br />

The actual migration operation is handled by the migrate_all_online.sh command, as follows:<br />

# cd /usr/share/migrationtools<br />

# LDAPADD="/usr/bin/ldapadd -c" ETC_ALIASES=/dev/null ./migrate_all_online.sh<br />

The migrate_all_online.sh asks a few questions about the LDAP database into which the data<br />

is to be migrated. Table 11.1 summarizes the answers given in the Falcot use-case.<br />

We deliberately ignore migration of the /etc/aliases file, since the standard schema as provided<br />

by Debian does not include the structures that this script uses to describe email aliases.<br />

Chapter 11 — Network Services: Postfix, Apache, NFS, Samba, Squid, LDAP<br />

289

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

Saved successfully!

Ooh no, something went wrong!