====== LDAPによるバーチャルユーザの設定 ====== 標準だと [color=red]LDAPオプションがOFF[/color]なので注意 ===== Pure-FTPdの設定 ===== LDAPConfigFile を指定することで、ユーザ認証をLDAPで行います。\\ その他のオプションなど、詳しくは[[serverapps:pure-ftpd:option|]]を参照。 # /usr/local/etc/pure-ftpd.conf DisplayDotFiles NO NoAnonymous YES LDAPConfigFile /usr/local/etc/pureftpd-ldap.conf ===== LDAPの設定 ===== LDAPサーバの用意については、[[serverapps:openldap|こちら(Open LDAP)]]を参照してください。 ==== スキーマの準備 ==== Pure-ftpdは独自のスキーマが用意されていますので、これを利用します。\\ スキーマは /usr/local/share/doc/pure-ftpd/pureftpd.schema です。\\ これを、LDAPサーバの /usr/local/etc/openldap/schema にコピーします。 ==== スキーマの登録 ==== /usr/local/etc/openldap/slapd.conf に以下の行を追加 include /usr/local/etc/openldap/schema/pureftpd.schema LDAPの再起動 # /usr/local/etc/rc.d/slapd restart ===== Pure-FTPdのLDAP設定 ===== 設定ファイルは、pure-ftpd.confのLDAPConfigFileで設定した /usr/local/etc/pureftpd-ldap.conf 主な設定項目は以下の通り。 ^設定項目^概要^ |LDAPServer|LDAPサーバの名前 or IP| |LDAPPort|LDAPのポート| |LDAPBaseDN|ベースDN。ここを起点に検索される| |LDAPBindDN|LDAP接続ユーザ| |LDAPBindPW|パスワード| |LDAPDefaultUID|指定がない場合のUID| |LDAPDefaultGID|指定がない場合のGID| |LDAPFilter|検索フィルタ| |LDAPHomeDir|ホームディレクトリが格納されているLDAP属性名| ||| ||| ||| ===== バーチャルユーザの設定 ===== LDAP上に仮想ユーザのエントリーを作成します。 設定例: dn: uid=testuser,ou=ftp,dc=my-domain,dc=com objectClass: PureFTPdUser objectClass: account objectClass: simpleSecurityObject uid: testuser FTPhomeDirectory: /home/ftp/testuser userPassword: {SSHA} u00s00e00r00P00a00s00s00w00o00r00d FTPgid: 1000 FTPuid: 1000 なお、[color=red]FTPhomeDirectory[/color]は標準ではpureftpdのスキーマにはありませんので、自分で追加しています。