This article describes how to install the two software:PureftpdAndOpenLDAP
The versions required for integration are as follows:
PureFTPd 1.0.21
OpenLDAP 2.3.20
I deploy an LDAP server in my company as an authentication server for each application of the company to achieve single-point logon. The FTP server user and authentication must also be integrated with the LDAP server.
There are already many examples and documents on the OpenLDAP Installation Network. It is important to note the compilation and installation of PureFTPd. The installation of PureFTPd is also very careful on the Internet and the README documentation in this software package, but there is a problem with OpenLDAP2.3.10 integration.
There are two major issues related to FTPState:
(1) Change the attribute of the Issue and FTPState in the pureftp. schema to the boolean type. The schema syntax has an error.
(2) log_ldap.c does not compare the values of boolean Type by schema, and "enabled" and "disabled" are used as FTPState values.
Fix these two problems and the integration will be okay.
Compile PureFTPd as follows:
- # ./configure --with-ldap=/usr/local/openldap --with-quotas --with-throttling --with-ratios
-
- # make; make check; make install;
Then you don't have to configure the pureftpd-ldap.conf to start PureFtpd.
The related files are as follows:
- pureftpd.schema
-
-
- attributetype ( 1.3.6.1.4.1.6981.11.3.7 NAME 'FTPStatus
-
-
- DESC 'Account status: enabled or disabled'
-
-
- EQUALITY booleanMatch
-
-
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE )
-
- pure-ftpd.conf
-
-
- # LDAP configuration file (see README.LDAP)
-
-
- LDAPConfigFile /usr/local/etc/pureftpd-ldap.conf
-
- pureftpd-ldap.conf
-
-
- # Optional : name of the LDAP server. Default : localhos
-
-
- LDAPServer your_ldap_hostname
-
-
- # Optional : server port. Default : 389
-
-
- LDAPPort 389
-
-
- # Mandatory : the base DN to search accounts from. No default.
-
-
- LDAPBaseDN ou=ftp,dc=your_company
-
-
- # Optional : who we should bind the server as.
-
-
- # Default : binds anonymously
-
-
- LDAPBindDN cn=admin,dc=your_company
-
-
- # Password if we don't bind anonymously
-
-
- # This configuration file should be only readable by root
-
-
- LDAPBindPW password
You can configure to disable anonymous access.
Start PureFTPd
- # pure-config.pl pure-ftpd.conf
Log on.
Based on the description in the article, I believe everyone has their own experiences in the installation process of Pureftpd and OpenLDAP. I hope this article will be useful to everyone.