PureFtpd 1.0.21 + OpenLDAP 2.3.20 安裝筆記

來源:互聯網
上載者:User

本文我給大家介紹兩款軟體的安裝過程: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 如下:

  1. # ./configure --with-ldap=/usr/local/openldap --with-quotas --with-throttling --with-ratios  
  2.  
  3. # make; make check; make install;  

然後沒配置好 pureftpd-ldap.conf 啟動PureFtpd就可以了。

相關檔案如下:

  1. pureftpd.schema  
  2.  
  3.  
  4. attributetype ( 1.3.6.1.4.1.6981.11.3.7 NAME 'FTPStatus  
  5.  
  6.  
  7. DESC 'Account status: enabled or disabled' 
  8.  
  9.  
  10. EQUALITY booleanMatch  
  11.  
  12.  
  13. SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE )  
  14.  
  15. pure-ftpd.conf  
  16.  
  17.  
  18. # LDAP configuration file (see README.LDAP)  
  19.  
  20.  
  21. LDAPConfigFile /usr/local/etc/pureftpd-ldap.conf  
  22.  
  23. pureftpd-ldap.conf  
  24.  
  25.  
  26. # Optional : name of the LDAP server. Default : localhos  
  27.  
  28.  
  29. LDAPServer your_ldap_hostname  
  30.  
  31.  
  32. # Optional : server port. Default : 389  
  33.  
  34.  
  35. LDAPPort 389  
  36.  
  37.  
  38. # Mandatory : the base DN to search accounts from. No default.  
  39.  
  40.  
  41. LDAPBaseDN ou=ftp,dc=your_company  
  42.  
  43.  
  44. # Optional : who we should bind the server as.  
  45.  
  46.  
  47. # Default : binds anonymously  
  48.  
  49.  
  50. LDAPBindDN cn=admin,dc=your_company  
  51.  
  52.  
  53. # Password if we don't bind anonymously  
  54.  
  55.  
  56. # This configuration file should be only readable by root  
  57.  
  58.  
  59. LDAPBindPW password  

可以配置為關閉匿名訪問。

啟動PureFTPd

  1. # pure-config.pl pure-ftpd.conf  

登入即可

通過文章的描述,相信大家都對Pureftpd 和  OpenLDAP 的安裝過程有了自己的心得,希望本文對大家有用。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.