Ubuntu Unleashed 2019 Edition: Covering 18.04, 18.10, 19.04

(singke) #1

stopping and restarting the service, as was required in earlier versions. You
need two files for this configuration: a back end that has only a minimal
configuration and a front end that uses a traditional format that is compatible
with and accessed by external programs, using established standards.


Creating Your Schema


Start creating your schema by loading some premade schema files. This
makes configuration faster and easier by preloading some settings. If you are
building an enterprise server, read the official OpenLDAP documentation and
start from scratch so that you know precisely what everything on your server
is doing and why. For the example in this chapter, load these three files into
the directory using the following commands:


Click here to view code image
matthew@seymour:~$ sudo ldapadd -Y EXTERNAL -H ldapi:/// -f
/etc/ldap/schema/
cosine.ldif
matthew@seymour:~$ sudo ldapadd -Y EXTERNAL -H ldapi:/// -f
/etc/ldap/schema/
nis.ldif
matthew@seymour:~$ sudo ldapadd -Y EXTERNAL -H ldapi:/// -f
/etc/ldap/schema/
inetorgperson.ldif


Next, create a file called backend.matthewhelmke.com.ldif with
these contents:


Click here to view code image


Load dynamic backend modules


dn: cn=module,cn=config
objectClass: olcModuleList
cn: module
olcModulepath: /usr/lib/ldap
olcModuleload: back_hdb


#   Database    settings
dn: olcDatabase=hdb,cn=config
objectClass: olcDatabaseConfig
objectClass: olcHdbConfig
olcDatabase: {1}hdb
olcSuffix: dc=matthewhelmke,dc=com
olcDbDirectory: /var/lib/ldap
olcRootDN: cn=admin,dc=matthewhelmke,dc=com
olcRootPW: changeMEtoSOMETHINGbetter
olcDbConfig: set_cachesize 0 2097152 0
olcDbConfig: set_lk_max_objects 1500
Free download pdf