PureFtpd 1.0.21 + OpenLDAP 2.3.20 安裝筆記
本文我給大家介紹兩款軟件的安裝過程:Pureftpd 和 OpenLDAP
集成所需要的版本 如題:
PureFTPd 1.0.21
OpenLDAP 2.3.20
先說一下這種集成的需求根據,我在公司里部署了LDAP服務器,作為公司各個應用的認證服務器,以實現單點登錄。FTP服務器的用戶和認證也需要與LDAP服務器集成。
OpenLDAP的安裝網上已經有很多例子和文檔了,這里就不多說了。重點需要注意的是 PureFTPd的編譯安裝,PureFTPd的安裝網上和該軟件包里的README文檔也說得很仔細了,但與OpenLDAP2.3.10集成有問題。
主要有2個問題,都與FTPState有關:
(1)pureftp.schema里的Issue,FTPState 的屬性改為了boolean型,schema的語法有個錯誤。
(2)log_ldap.c里沒有按schema的boolean型比較,而且用"enabled" 和 "disabled" 來作為FTPState的值來比較。
修正這兩個問題,集成就沒問題了。
編譯PureFTPd 如下:
- # ./configure --with-ldap=/usr/local/openldap --with-quotas --with-throttling --with-ratios
- # make; make check; make install;
然后沒配置好 pureftpd-ldap.conf 啟動PureFtpd就可以了。
相關文件如下:
- 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
可以配置為關閉匿名訪問。
啟動PureFTPd
- # pure-config.pl pure-ftpd.conf
登錄即可
通過文章的描述,相信大家都對Pureftpd 和 OpenLDAP 的安裝過程有了自己的心得,希望本文對大家有用。
【編輯推薦】
- Debian下pureftpd的安裝心得
- Linux環境PureFTPd安裝配置(上篇)
- Linux環境PureFTPd安裝配置(下篇)
- Pureftpd和PostgreSQL聯合使用
- Pureftpd 命令語法
- 在Windows和Unix系統中使用OpenLDAP的利弊
- Fedora openldap環境說明配置目的實現原理
- 14.2.1 安裝OpenLDAP服務器程序