Requirements

  • sudo apt-get install pureftpd-ldap
    

Installation

?shnippet:

sudo true

#- Disable PAM authentication
echo no | sudo tee /etc/pure-ftpd/conf/PAMAuthentication

echo 2 | sudo tee /etc/pure-ftpd/conf/TLS

#- Setup LDAP authentication
sudo editor /etc/pure-ftpd/db/ldap.conf

#- Comment out LDAPServer, it default to localhost
#LDAPServer ldap.example.com

#- Change LDAPBaseDN
#LDAPBaseDN cn=Users,dc=c9x,dc=org
LDAPBaseDN dc=magma-soft,dc=at

#- Change LDAPBindDN
# LDAPBindDN cn=Manager,dc=c9x,dc=org
LDAPBindDN cn=$(hostname),ou=pure-ftpd,dc=magma-soft,dc=at

#- Change LDAPBindPW
#LDAPBindPW r00tPaSsw0rD
LDAPBindPW $(password)

#- Change LDAPFilter
# LDAPFilter (&(objectClass=posixAccount)(uid=\L))
LDAPFilter (&(objectClass=PureFTPdUser)(mail=\L))

#- Change LDAPHomeDir
# LDAPHomeDir homeDirectory
LDAPHomeDir FTPDirectory

#- Change LDAPAuthMethod
#LDAPAuthMethod PASSWORD
LDAPAuthMethod BIND

#- Change LDAPDefaultHomeDirectory
# LDAPDefaultHomeDirectory /var/shared
LDAPDefaultHomeDirectory /nonexistent

#- save and exit, remove backup file

#- Enable (force) TLS
echo 2 | sudo tee /etc/pure-ftpd/conf/TLS


#- Reload configuration
sudo service pure-ftpd-ldap restart