Mod_ldap_userdir allows Apache web server to retrieve user home directories.
- Begin by unarchiving the mod_ldap_userdir-1.1.9.tar.gz file using the gzip -dc command to decompress it and tar xf - to extract it.
- Next, navigate to the mod_ldap_userdir-1.1.9 folder and run ./configure --with-activate, followed by make and make install.
If your LDAP server operates on OpenLDAP 1.x, you will need to add the posixAccount schema definition, which involves adding the contents of posixAccount-objectclass to your slapd.oc.conf, then restarting your LDAP server. Most other LDAP servers, such as OpenLDAP 2.x, ship with this schema pre-defined.
The user-ldif file has a sample user ldif, which you can customize to suit your preferences. After modifying, run ldapadd -D your-root-dn -w your-root-dn-password < ldif.
It is highly advisable to read up on the LDAP config-file directives found in the DIRECTIVES file included in the distribution. At a minimum, you will require the LDAPUserDir, LDAPUserDirDNInfo, and LDAPUserDirBaseDN configuration directives in your httpd.conf.
A basic set of mod_ldap_userdir configuration directives typically includes the following:
- LDAPUserDir public_html
- LDAPUserDirDNInfo cn=your-dn,dc=example,dc=com dnpass
- LDAPUserDirBaseDN ou=People,dc=example,dc=com
However, you should substitute these values with those that fit your environment. Overall, the mod_ldap_userdir module provides a seamless way to look up user home directories when using /~user URLs by tapping into the power of an LDAP directory.
Version 1.1.13: N/A