#############################################
#                                           #
# Sample Pure-FTPd LDAP configuration file. #
# See README.LDAP for explanations.         #
#                                           #
#############################################

# Optional : name of the LDAP server. Default : localhost

#LDAPServer ldap.c9x.org
LDAPServer localhost

# Optional : server port. Default : 389

LDAPPort   389

# Mandatory : the base DN to search accounts from. No default.

#LDAPBaseDN cn=Users,dc=c9x,dc=org
LDAPBaseDN o=domains,dc=example,dc=com

# Optional : who we should bind the server as.
#            Default : binds anonymously

#LDAPBindDN cn=Manager,dc=c9x,dc=org
LDAPBindDN cn=vmail,dc=example,dc=com

# Password if we don't bind anonymously
# This configuration file should be only readable by root

#LDAPBindPW r00tPaSsw0rD
LDAPBindPW xjlE6sfKWy6CNmVXIfa4iwkmun0MTJ

# Optional : default UID, when there's no entry in an user object

# LDAPDefaultUID 500
LDAPDefaultUID 1000

# Optional : default GID, when there's no entry in an user object

# LDAPDefaultGID 100
LDAPDefaultGID 1000

# Filter to use to find the object that contains user info
# \L is replaced by the login the user is trying to log in as
# The default filter is (&(objectClass=posixAccount)(uid=\L))

# LDAPFilter (&(objectClass=posixAccount)(uid=\L))
LDAPFilter (&(objectClass=PureFTPdUser)(mail=\L)(FTPStatus=enabled))

# Attribute to get the home directory
# Default is homeDirectory (the standard attribute from posixAccount)

# LDAPHomeDir homeDirectory
LDAPHomeDir FTPHomeDir

# LDAP protocol version to use
# Version 3 (default) is mandatory with recent releases of OpenLDAP.

# LDAPVersion 3
LDAPVersion 3

EXEMPLES:

LDAPServer domaine-controleur.aabv.local.lan # (localhost ou ldap.example.com par exemple)
LDAPPort 389 # Port du serveur LDAP (AD)
LDAPBaseDN ou=Etudiants,dc=aabv,dc=local,dc=lan # Base de recherche pour les comptes utilisateurs
LDAPBindDN cn=Administrateur,dc=aabv,dc=local,dc=lan # Rajouter l'administrateur LDAP afin de pouvoir parcourir l'annuaire LDAP
LDAPBindPW secret # Mot de passe en claire de l'administrateur LDAP (huhu ... pas bien cela)
LDAPDefaultUID 2001 # Utilisateur par d�fault si l'utilisateur n'est pas reconnu (ici ftpuser)
LDAPDefaultGID 2001 # Groupe par d�fault si l'utilisateur n'est pas reconnu (ici ftpgroup)
LDAPVersion 3 # Version de LDAP utilis�e

OU

LDAPServer localhost
LDAPPort 389
LDAPBaseDN o=domains,dc=example,dc=com
LDAPBindDN cn=vmail,dc=example,dc=com
LDAPBindPW kZ6uB29mViWKWI9lOH3cGnF7z3Dw3B #cn=vmail password
LDAPDefaultUID 1002      # <- UID of 'vmail' user.
LDAPDefaultGID 1002      # <- GID of 'vmail' user.
LDAPFilter (&(objectClass=PureFTPdUser)(mail=\L)(FTPStatus=enabled))
LDAPHomeDir FTPHomeDir  # <- This is new attribute, we will add it
LDAPVersion 3
