03 7月 2010 @ 9:11 PM 

proftpdをインストール。

# aptitude install proftpd

debian lennyだと一緒にproftpd-mod-ldapもインストールされる。
なければ入れること。

/etc/proftpd/proftpd.conf
認証時、最初にldapで行うようにし、ldap.confを読み込むように。
ほかは普通に設定。

AuthOrder                       mod_ldap.c* mod_auth_pam.c* mod_auth_unix.c
Include /etc/proftpd/ldap.conf
# ログインシェルが定義されていないなら以下も
RequireValidShell               off

/etc/proftpd/modules.conf

LoadModule mod_ldap.c

/etc/proftpd/ldap.conf

<IfModule mod_ldap.c>
#
# This is used for ordinary LDAP connections, with or without TLS
#
LDAPServer 192.168.1.x
LDAPDNInfo "cn=admin,dc=waterblue,dc=net" "somepassword"
LDAPDoAuth on "ou=Users,dc=waterblue,dc=net"
# 以下はLDAP認証したユーザを強制的に特定ユーザにマッピングする設定
# うちの都合
LDAPDefaultUID xx
LDAPDefaultGID yy
LDAPForceDefaultUID on
LDAPForceDefaultGID on

</IfModule>

LDAPDNInfoでrootdnのパスワードを記述することになるので、/etc/proftpd/ldap.confのパーミッションを変更。

# chmod 600 /etc/proftpd/ldap.conf

もしくは、LDAPDNInfoを使わず、anonymousでもLDAP認証可能なようにLDAPサーバのアクセス制御を構成しておく。
LDAPサーバの/etc/ldap/slapd.confで

access to attrs=userPassword
        by self write
        by anonymous auth
        by * none

access to *
        by self write
        by * read

みたいな感じ。


Posted By: ゆ。
Last Edit: 03 7月 2010 @ 09:11 PM

EmailPermalink
Tags
Tags: LDAP, proftpd
Categories: Linux, PC


 

Responses to this post » (None)

 
Post a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


 Last 50 Posts
 Back
Change Theme...
  • Users » 100
  • Posts/Pages » 301
  • Comments » 174
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight