    Django LDAP Backend (django_ldapbackend)

1. You will require Django and LDAP.
2. Install this (easy_install should do it).
3. Add the following to your settings.py without the comments:

#AUTHENTICATION_BACKENDS = (
# 'django_ldapbackend.LDAPBackend',
# 'django.contrib.auth.backends.ModelBackend',
#)

This is the LDAP Backend with the default as fallback.

4. Add the following settings to your settings.py, customing as required:

# Required
AUTH_LDAP_SERVER = '127.0.0.1'                       # Hostname
AUTH_LDAP_BASE_USER = "cn=admin,dc=example,dc=com"   # Administrative User's Username
AUTH_LDAP_BASE_PASS = "password"                     # Administrative User's Password 
AUTH_LDAP_BASE_DN = "dc=example,dc=com"              # Base DN (also accepts o=example.com format)
AUTH_LDAP_FIELD_DOMAIN = "example.com"               # Domain from which users will take the domain for dummy e-mail generation (it keeps Django happy!)
AUTH_LDAP_GROUP_NAME = "ldap_people"                 # Django group for LDAP users (helps us manage them for password changing, etc.)
AUTH_LDAP_VERSION = 3                                # LDAP version
AUTH_LDAP_OLDPW = False                              # Can the server take the old password? True/False

# Optional
AUTH_LDAP_FIELD_USERAUTH = "uid"                     # The field from which the user authentication shall be done.
AUTH_LDAP_FIELD_AUTHUNIT = "People"                  # The organisational unit in which your users shall be found.
AUTH_LDAP_FIELD_USERNAME = "uid"                     # The field from which to draw the username (Default 'uid'). (Allows non-uid/non-dn custom fields to be used for login.)
AUTH_LDAP_WITHDRAW_EMAIL = False                     # Should django try the directory for the user's email ('mail')? True/False.

5. Add the following to your URLs (customising as required):

    (r'^profile/password/$', 'django_ldapbackend.views.password_change'),
    (r'^profile/password/changed/$', 'django.contrib.auth.views.password_change_done'),
