PureFtpd 1.0.21 + OpenLDAP 2.3.20 安装笔记

系统 Linux
Pureftpd是一款在多种类Unix上使用并符合GPL协议的原代码开放的软件,顾名思义,它就是一款纯粹的Ftp程序。OpenLDAP是轻型目录访问协议(Lightweight Directory Access Protocol,LDAP)的自由和开源的实现,在其OpenLDAP许可证下发行,并已经被包含在众多流行的Linux发行版中。

本文我给大家介绍两款软件的安装过程:PureftpdOpenLDAP

  集成所需要的版本 如题:

  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 的安装过程有了自己的心得,希望本文对大家有用。

【编辑推荐】

  1. Debian下pureftpd的安装心得
  2. Linux环境PureFTPd安装配置(上篇)
  3. Linux环境PureFTPd安装配置(下篇)
  4. Pureftpd和PostgreSQL联合使用
  5. Pureftpd 命令语法
  6. 在Windows和Unix系统中使用OpenLDAP的利弊
  7. Fedora openldap环境说明配置目的实现原理
  8. 14.2.1 安装OpenLDAP服务器程序

 

责任编辑:赵鹏 来源: 网络转载
相关推荐

2011-02-25 16:22:34

2011-03-03 16:17:14

PureFTPd

2011-02-24 14:45:37

pureftpd安装文档

2011-02-24 14:45:37

pureftpd安装文档

2011-02-25 17:48:52

2011-02-25 17:19:09

Pureftpd安装

2011-03-02 09:07:59

pureftpdDebian

2011-03-02 08:57:51

2011-02-24 15:51:23

Pureftpd安装

2011-02-25 18:11:48

LinuxPureFTPd

2011-03-02 13:02:37

2011-03-02 13:16:33

Pureftpd

2011-03-02 16:36:41

pureftpdLNMPDebian5

2011-03-03 15:09:30

PureFTPdFAQ

2011-02-25 17:49:21

2011-03-03 14:42:12

PureFTPd

2011-03-03 14:16:48

PureFTPd

2011-02-23 14:05:57

2011-03-03 09:34:34

PureFTPd

2011-03-03 11:13:11

Pureftpd
点赞
收藏

51CTO技术栈公众号