Код: Выделить всё
ChrootEveryone yes
BrokenClientsCompatibility no
MaxClientsNumber 50
Daemonize yes
MaxClientsPerIP 3
VerboseLog yes
AllowDotFiles yes
DisplayDotFiles yes
AnonymousOnly no
NoAnonymous yes
SyslogFacility ftp
DontResolve yes
MaxIdleTime 15
#PAMAuthentication yes
LDAPConfigFile /etc/pure-ftpd/pureftpd-ldap.conf
LimitRecursion 2000 8
AnonymousCanCreateDirs no
MaxLoad 4
AntiWarez yes
Umask 133:022
MinUID 100
AllowUserFXP no
AllowAnonymousFXP no
ProhibitDotFilesWrite no
ProhibitDotFilesRead no
AutoRename yes
AnonymousCantUpload no
MaxDiskUsage 99
NoRename yes
CustomerProof yes
Есть натсроенный LDAP-сервер, в нём есть пару тэстовых пользователей. Вот я и хочу чтобы при авторизации на ftp пользователи брались из LDAP.
Код: Выделить всё
sles10:/ # cat /etc/pure-ftpd/pureftpd-ldap.conf
LDAPServer test.com.ua
LDAPPort 389
LDAPBaseDN dc=test,dc=com,dc=ua
LDAPBindDN cn=admin,dc=test,dc=com,dc=ua
LDAPBindPW admin
LDAPDefaultUID 500
LDAPDefaultGID 100
Код: Выделить всё
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/rfc2307bis.schema
include /etc/openldap/schema/yast.schema
include /etc/openldap/schema/openldap.schema
include /etc/openldap/schema/pureftpd.schema
pidfile /var/run/slapd/slapd.pid
argsfile /var/run/slapd/slapd.args
modulepath /usr/lib/openldap/modules
access to dn.base=""
by * read
access to dn.base="cn=Subschema"
by * read
access to attrs=userPassword,userPKCS12
by self write
by * auth
access to attrs=shadowLastChange
by self write
by * read
access to *
by * read
#######################################################################
# BDB database definitions
#######################################################################
loglevel 0
database bdb
suffix "dc=test,dc=com,dc=ua"
rootdn "cn=admin,dc=test,dc=com,dc=ua"
rootpw "{ssha}/aMQsKLh0s/tFUge791xVmUuATtUSEZaUg=="
directory /var/lib/ldap/dc=test_dc=com_dc=ua
checkpoint 1024 5
cachesize 10000
index objectClass,uidNumber,gidNumber eq
index member,mail eq,pres
index cn,displayname,uid,sn,givenname sub,eq,pres
Код: Выделить всё
ftp sles10
Connected to sles10
220-Welcome to Pure-FTPd.
220-You are user number 1 of 50 allowed.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
Name (sles10:mekhasyukve): sit
331 User sit OK. Password required
Password:
421 Service not available, remote server timed out. Connection closed
ftp: Login failed.