PureFtpd 1.0.21 + OpenLDAP 2.3.20 安裝筆記
本文我給大家介紹兩款軟件的安裝過程:Pureftpd 和 OpenLDAP
集成所需要的版本 如題:
PureFTPd 1.0.21
OpenLDAP 2.3.20
先說一下這種集成的需求根據(jù),我在公司里部署了LDAP服務(wù)器,作為公司各個應(yīng)用的認(rèn)證服務(wù)器,以實(shí)現(xiàn)單點(diǎn)登錄。FTP服務(wù)器的用戶和認(rèn)證也需要與LDAP服務(wù)器集成。
OpenLDAP的安裝網(wǎng)上已經(jīng)有很多例子和文檔了,這里就不多說了。重點(diǎn)需要注意的是 PureFTPd的編譯安裝,PureFTPd的安裝網(wǎng)上和該軟件包里的README文檔也說得很仔細(xì)了,但與OpenLDAP2.3.10集成有問題。
主要有2個問題,都與FTPState有關(guān):
(1)pureftp.schema里的Issue,F(xiàn)TPState 的屬性改為了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就可以了。
相關(guān)文件如下:
- 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
可以配置為關(guān)閉匿名訪問。
啟動PureFTPd
- # pure-config.pl pure-ftpd.conf
登錄即可
通過文章的描述,相信大家都對Pureftpd 和 OpenLDAP 的安裝過程有了自己的心得,希望本文對大家有用。
【編輯推薦】
- Debian下pureftpd的安裝心得
- Linux環(huán)境PureFTPd安裝配置(上篇)
- Linux環(huán)境PureFTPd安裝配置(下篇)
- Pureftpd和PostgreSQL聯(lián)合使用
- Pureftpd 命令語法
- 在Windows和Unix系統(tǒng)中使用OpenLDAP的利弊
- Fedora openldap環(huán)境說明配置目的實(shí)現(xiàn)原理
- 14.2.1 安裝OpenLDAP服務(wù)器程序