Форум русскоязычного сообщества Ubuntu


Считаете, что Ubuntu недостаточно дружелюбна к новичкам?
Помогите создать новое Руководство для новичков!

Автор Тема: proftpd + active directory  (Прочитано 6259 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн rozenkreuser

  • Автор темы
  • Новичок
  • *
  • Сообщений: 11
    • Просмотр профиля
proftpd + active directory
« : 18 Мая 2012, 01:00:25 »
Есть dc win 2008 r2. Задача : сделать авторизацию на ftp(proftpd на ubuntu server 11.04) сервере через dc.Пробывал делать http://inhibitz.ucoz.ru/publ/nastrojka_ftp_servera_proftpd_s_avtorizaciej_po_active_directory_i_sistemnykh_polzovatelej_linux/2-1-0-25 ,но на контроллере домена нету даже сообщений что кто то пытался на нем авторизоваться. В логах фтп сервера появляется ошибка : неизвестный пользоваьель.
Подскажите может есть какой нибудь мануал по настройке prftpd (или любой другой фтр сервер) с авторизаций в AD?

Оффлайн Дмитрий Бо

  • Погонщик серверов
  • Модератор раздела
  • Старожил
  • *
  • Сообщений: 3549
  • Я не техподдержка, я за порядком слежу
    • Просмотр профиля
Re: proftpd + active directory
« Ответ #1 : 19 Мая 2012, 15:19:22 »
как минимум, нужно запостить сюда proftpd.conf.

Оффлайн satch

  • Заслуженный пользователь
  • Старожил
  • *
  • Сообщений: 1561
  • Kubuntu 15.10 amd64
    • Просмотр профиля
Re: proftpd + active directory
« Ответ #2 : 19 Мая 2012, 18:06:05 »
как минимум, надо войти в домен, а в инструкции этого нет! AD не будет отдавать юзеров неавторизованным компьютерам/серверам.
Наше желание помочь прямопропорционально вашему желанию решить проблему

Оффлайн rozenkreuser

  • Автор темы
  • Новичок
  • *
  • Сообщений: 11
    • Просмотр профиля
Re: proftpd + active directory
« Ответ #3 : 21 Мая 2012, 09:02:49 »
Цитировать
как минимум, надо войти в домен, а в инструкции этого нет! AD не будет отдавать юзеров неавторизованным компьютерам/серверам.
А если ваторизацию через LDAP делать? Сервер всеравно должен юыть в домене? Вносить в домен его через samba+winbind?

Оффлайн satch

  • Заслуженный пользователь
  • Старожил
  • *
  • Сообщений: 1561
  • Kubuntu 15.10 amd64
    • Просмотр профиля
Re: proftpd + active directory
« Ответ #4 : 21 Мая 2012, 09:20:47 »
не уверен что нужна самба, но винбайнд точно нужен.
попробуйте по этой статье
Наше желание помочь прямопропорционально вашему желанию решить проблему

Оффлайн rozenkreuser

  • Автор темы
  • Новичок
  • *
  • Сообщений: 11
    • Просмотр профиля
Re: proftpd + active directory
« Ответ #5 : 23 Мая 2012, 13:45:36 »
proftpd.conf
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
# To really apply changes reload proftpd after modifications.


# Includes DSO modules
Include /etc/proftpd/modules.conf

# Set off to disable IPv6 support which is annoying on IPv4 only boxes.
UseIPv6                         off
# If set on you can experience a longer connection delay in many cases.
IdentLookups                    off
ServerIdent on "FTP Server ready."

# Приветствие при успешной регистрации на ftp-сервере
AccessGrantMsg "WELCOME FTP Server InHibitz"

DebugLevel 10  # включаем более подробный лог

ServerName                      "Administrator FTP"
ServerType                      standalone
DeferWelcome                    off

MultilineRFC2228                on
DefaultServer                    on
ShowSymlinks                   on

TimeoutNoTransfer            600
TimeoutStalled                  600
TimeoutIdle                     1200

DisplayLogin                    welcome.msg
DisplayChdir                    .message true
ListOptions                     "-l"

DenyFilter                      \*.*/

# Use this to jail all users in their homes
DefaultRoot                     ~

# Users require a valid shell listed in /etc/shells to login.
# Use this directive to release that constrain.
# RequireValidShell             off

# Port 21 is the standard FTP port.
Port                            21

# In some cases you have to specify passive ports range to by-pass
# firewall limitations. Ephemeral ports can be used for that, but
# feel free to use a more narrow range.
# PassivePorts                  49152 65534
# If your host was NATted, this option is useful in order to
# allow passive tranfers to work. You have to use your public
# address and opening the passive ports used on your firewall as well.
# MasqueradeAddress             1.2.3.4

# This is useful for masquerading address with dynamic IPs:
# refresh any configured MasqueradeAddress directives every 8 hours
<IfModule mod_dynmasq.c>
# DynMasqRefresh 28800
</IfModule>

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances                    30

# Set the user and group that the server normally runs at.
User                            ftp
Group                           nogroup

# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask                           022  022
# Normally, we want files to be overwriteable.
AllowOverwrite                  on

# Uncomment this if you are using NIS or LDAP via NSS to retrieve passwords:
#PersistentPasswd               off

# This is required to use both PAM-based authentication and local passwords
#AuthOrder                      mod_auth_pam.c* mod_auth_unix.c

AuthPAMConfig                   proftpd

# Be warned: use of this directive impacts CPU average load!
# Uncomment this if you like to see progress and transfer rate with ftpwho
# in downloads. That is not needed for uploads rates.
#
# UseSendFile                   off

TransferLog /var/log/proftpd/xferlog
SystemLog   /var/log/proftpd/proftpd.log

<IfModule mod_quotatab.c>
QuotaEngine off
</IfModule>

<IfModule mod_ratio.c>
Ratios off
</IfModule>


# Delay engine reduces impact of the so-called Timing Attack described in
# http://security.lss.hr/index.php?page=details&ID=LSS-2004-10-02
# It is on by default.
<IfModule mod_delay.c>
DelayEngine on
</IfModule>

<IfModule mod_ctrls.c>
ControlsEngine        off
ControlsMaxClients    2
ControlsLog           /var/log/proftpd/controls.log
ControlsInterval      5
ControlsSocket        /var/run/proftpd/proftpd.sock
</IfModule>

<IfModule mod_ctrls_admin.c>
AdminControlsEngine off
</IfModule>

#
# Alternative authentication frameworks
#
Include /etc/proftpd/ldap.conf
#Include /etc/proftpd/sql.conf

#
# This is used for FTPS connections
#

#Include /etc/proftpd/tls.conf

# A basic anonymous configuration, no upload directories.


MaxLoginAttempts 5 "Количество попыток авторизации исчерпано"

ldap.conf
<IfModule mod_ldap.c>

AuthOrder mod_ldap.c mod_auth_unix.c # подключаем модуль ldap и unix

LDAPServer x.x.x.x  # наш LDAP сервер

LDAPAttr uid SAMAccountname
LDAPGenerateHomedir on                              # создаем домашние ftp директории пользователей
LDAPGenerateHomedirPrefix /home/ftp/pub    # в /home/ftp/pub
CreateHome on 0755                                    # и назначаем chmod 755

# В данном случае все LDAP FTP пользователи располагаются в Группе (OU) People в AD. Если Вы их оставите в Users (по умолчанию где создаются AD пользователи), то необходимо заменить запись ou=people на cn=users.

LDAPDNInfo "CN=Administrator,CN=Users,DC=xxx,DC=xxx" "xxxxxxxx"
LDAPDoAuth on "CN=ftp,CN=Users,DC=xxxxx,DC=xxxxx" "samAccountName=%u"
LDAPAuthBinds on

# пользователям назначаем права chown на создание директорий (файлов)
LDAPDefaultGID 65534     # group nogroup см. /etc/group
LDAPDefaultUID 105         # user proftpd    см. /etc/passwd

#uid - user id цифровое значение пользователя (первый не-рут пользователь в сиcтеме как правило 1000, рут - 0 )
#gid - group id цифровое значение группы пользователей (группа users например - 100, группа root 0)

</IfModule>

RequireValidShell off # (авторизовывать клиента только если он имеет основной shell из списка /et/shells; область действия - основной сервер, Global, VirtualHost, Anonymous т.е. отключает проверку командного интерпретатора пользователя - это лишнее)
UseFtpUsers off
PersistentPasswd off

<IfModule mod_auth_pam.c>
    AuthPAM off       # не используем дополнительные PAM модули
</IfModule>

в логах при коннекте :
Май 23 12:59:32 ftp-srv proftpd[2081] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'QUIT' to mod_rewrite
Май 23 12:59:32 ftp-srv proftpd[2081] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'QUIT' to mod_tls
Май 23 12:59:32 ftp-srv proftpd[2081] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'QUIT' to mod_core
Май 23 12:59:32 ftp-srv proftpd[2081] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'QUIT' to mod_core
Май 23 12:59:32 ftp-srv proftpd[2081] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching CMD command 'QUIT' to mod_core
Май 23 12:59:32 ftp-srv proftpd[2081] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching LOG_CMD command 'QUIT' to mod_log
Май 23 12:59:32 ftp-srv proftpd[2081] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching LOG_CMD command 'QUIT' to mod_core
Май 23 12:59:32 ftp-srv proftpd[2081] ftp-srv.xxxxx (localhost[127.0.0.1]): FTP session closed.
Май 23 12:59:34 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): connected - local  : 127.0.0.1:21
Май 23 12:59:34 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): connected - remote : 127.0.0.1:46377
Май 23 12:59:34 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): FTP session opened.
Май 23 12:59:37 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'USER suhorukovva' to mod_rewrite
Май 23 12:59:37 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'USER suhorukovva' to mod_tls
Май 23 12:59:37 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'USER suhorukovva' to mod_core
Май 23 12:59:37 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'USER suhorukovva' to mod_core
Май 23 12:59:37 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'USER suhorukovva' to mod_delay
Май 23 12:59:37 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'USER suhorukovva' to mod_auth
Май 23 12:59:37 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching CMD command 'USER suhorukovva' to mod_auth
Май 23 12:59:37 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): retrieved group IDs: 10005, 10011, 10010, 10009, 10008, 10007, 10006
Май 23 12:59:37 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): retrieved group names: администраторы домена, ftp, пользователи домена, vpn, сотрудники рэу, scan operators, группа с запрещением репликации паролей rodc
Май 23 12:59:37 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching POST_CMD command 'USER suhorukovva' to mod_delay
Май 23 12:59:38 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching LOG_CMD command 'USER suhorukovva' to mod_log
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'PASS (hidden)' to mod_rewrite
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'PASS (hidden)' to mod_tls
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'PASS (hidden)' to mod_core
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'PASS (hidden)' to mod_core
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'PASS (hidden)' to mod_wrap2
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'PASS (hidden)' to mod_ban
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'PASS (hidden)' to mod_wrap
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'PASS (hidden)' to mod_radius
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'PASS (hidden)' to mod_delay
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'PASS (hidden)' to mod_auth
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching CMD command 'PASS (hidden)' to mod_auth
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): retrieved group IDs: 10005, 10011, 10010, 10009, 10008, 10007, 10006
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): retrieved group names: администраторы домена, ftp, пользователи домена, vpn, сотрудники рэу, scan operators, группа с запрещением репликации паролей rodc
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): retrieved UID 10000 for user 'suhorukovva'
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): ROOT PRIVS at mod_auth_unix.c:376
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): RELINQUISH PRIVS at mod_auth_unix.c:415
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): USER suhorukovva (Login failed): Incorrect password.
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching POST_CMD_ERR command 'PASS (hidden)' to mod_wrap2
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching POST_CMD_ERR command 'PASS (hidden)' to mod_delay
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching LOG_CMD_ERR command 'PASS (hidden)' to mod_log
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching LOG_CMD_ERR command 'PASS (hidden)' to mod_auth
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'SYST' to mod_rewrite
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'SYST' to mod_tls
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'SYST' to mod_core
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching PRE_CMD command 'SYST' to mod_core
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching CMD command 'SYST' to mod_core
Май 23 12:59:41 ftp-srv proftpd[2086] ftp-srv.xxxxx (localhost[127.0.0.1]): dispatching LOG_CMD command 'SYST' to mod_log

Оффлайн rozenkreuser

  • Автор темы
  • Новичок
  • *
  • Сообщений: 11
    • Просмотр профиля
Re: proftpd + active directory
« Ответ #6 : 25 Мая 2012, 09:55:53 »
начальника ругается ..... придется на форточках поднимать :'(

Оффлайн Dalon

  • Новичок
  • *
  • Сообщений: 30
    • Просмотр профиля
Re: proftpd + active directory
« Ответ #7 : 01 Июня 2012, 09:36:37 »
Ситуация схожая: LDAP+PROFTPD на UBUNTU 12.04
при попытке прописать в /etc/proftpd/ldap.conf

LDAPDoAuth on  "ou=users,ou=department,dc=your_domain,dc=ru" "(&(uid=%v)(objectclass=posixAccount))"
ругается таким образом:
proftpd[2843]: Fatal: unknown configuration directive 'LDAPDoAuth' on line 42 of '/etc/proftpd/proftpd.conf'
server:/etc/proftpd$ proftpd -l
(Нажмите, чтобы показать/скрыть)
т.е. mod_ldap.c - вроде как не установлен.
хотя при установке было так: sudo apt-get install proftpd-mod-ldap proftpd-basic
Вот тоже авторизация не проходит.
money is good servant but a bad master

Оффлайн Retraut

  • Новичок
  • *
  • Сообщений: 1
    • Просмотр профиля
    • retraut.co.cc
Re: proftpd + active directory
« Ответ #8 : 08 Августа 2012, 18:20:10 »
Привет посаны - у меня все вышло.
Вот вам конфиги <IfModule mod_ldap.c>

AuthOrder mod_ldap.c mod_auth_unix.c # подключаем модуль ldap и unix

LDAPServer 192.168.0.7  # наш LDAP сервер

LDAPAttr uid SAMAccountname
LDAPGenerateHomedir on                              # создаем домашние ftp директории пользователей
LDAPGenerateHomedirPrefix /home/ftp/pub             # в /home/ftp/pub
CreateHome on 0755                                  # и назначаем chmod 755

# В данном случае все LDAP FTP пользователи располагаются в Группе (OU) People в AD. Если Вы их оставите в Users (по умолчанию где создаются AD пользователи), то необходимо заменить запись ou=people на cn=users.

LDAPDNInfo "cn=ldap,cn=users,DC=preo,DC=local" "1111" - !!!! ЮЗЕР ИЗ AD КОТОРЫЙ ИМЕЕТ ПРАВО НА ПОИСК В AD НУЖЕН ДЛЯ НАХОЖДЕНИЯ ПОЛЬЗОВАТЕЛЕЙ 1111 - ЕГО ПАРОЛЬ
LDAPDoAuth on "ou=preo,dc=preo,dc=local" "samAccountName=%u" !!!! ГДЕ ИСКАТЬ ПОЛЬЗОВАТЕЛЕЙ В АД
LDAPAuthBinds on

# пользователям назначаем права chown на создание директорий (файлов)
LDAPDefaultGID 65534     # group nogroup см. /etc/group
LDAPDefaultUID 116         # user proftpd    см. /etc/passwd

#uid - user id цифровое значение пользователя (первый не-рут пользователь в сиcтеме как правило 1000, рут - 0 )
#gid - group id цифровое значение группы пользователей (группа users например - 100, группа root 0)

</IfModule>

RequireValidShell off # (авторизовывать клиента только если он имеет основной shell из списка /et/shells; область действия - основной сервер, Global, VirtualHost, Anonymous т.е. отключает проверку командного интерпретатора пользователя - это лишнее)
UseFtpUsers off
PersistentPasswd off

<IfModule mod_auth_pam.c>
    AuthPAM off       # не используем дополнительные PAM модули
</IfModule>

Вот мой proftpd.conf
#
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
# To really apply changes reload proftpd after modifications.
#

# Includes DSO modules
Include /etc/proftpd/modules.conf

# Set off to disable IPv6 support which is annoying on IPv4 only boxes.
UseIPv6 off
# If set on you can experience a longer connection delay in many cases.
IdentLookups off

# Приветствие при успешной регистрации на ftp-сервере
AccessGrantMsg "Приветствуем на сервере ООО НПП Преобразователь

ServerName "Preo FTP Server"
ServerType standalone
DeferWelcome off

MultilineRFC2228 on
DefaultServer on
ShowSymlinks on

TimeoutNoTransfer 600
TimeoutStalled 600
TimeoutIdle 1200

DisplayLogin                    welcome.msg
DisplayChdir                .message true
ListOptions                "-l"

DenyFilter \*.*/

# Use this to jail all users in their homes
# DefaultRoot ~

# Users require a valid shell listed in /etc/shells to login.
# Use this directive to release that constrain.
RequireValidShell off

# Port 21 is the standard FTP port.
Port 21

# In some cases you have to specify passive ports range to by-pass
# firewall limitations. Ephemeral ports can be used for that, but
# feel free to use a more narrow range.
# PassivePorts                  49152 65534

# If your host was NATted, this option is useful in order to
# allow passive tranfers to work. You have to use your public
# address and opening the passive ports used on your firewall as well.
# MasqueradeAddress 1.2.3.4

# This is useful for masquerading address with dynamic IPs:
# refresh any configured MasqueradeAddress directives every 8 hours
<IfModule mod_dynmasq.c>
# DynMasqRefresh 28800
</IfModule>

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 30

# Set the user and group that the server normally runs at.
User proftpd
Group nogroup

# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask 022  022
# Normally, we want files to be overwriteable.
AllowOverwrite on

# Uncomment this if you are using NIS or LDAP via NSS to retrieve passwords:
# PersistentPasswd off

DefaultRoot /home/ftp !retraut@preo.local
CreateHome on
RequireValidShell off

# This is required to use both PAM-based authentication and local passwords
# AuthOrder mod_auth_pam.c* mod_auth_unix.c

# Be warned: use of this directive impacts CPU average load!
# Uncomment this if you like to see progress and transfer rate with ftpwho
# in downloads. That is not needed for uploads rates.
#
# UseSendFile off

TransferLog /var/log/proftpd/xferlog
SystemLog   /var/log/proftpd/proftpd.log

<IfModule mod_quotatab.c>
QuotaEngine off
</IfModule>

<IfModule mod_ratio.c>
Ratios off
</IfModule>


# Delay engine reduces impact of the so-called Timing Attack described in
# http://security.lss.hr/index.php?page=details&ID=LSS-2004-10-02
# It is on by default.
<IfModule mod_delay.c>
DelayEngine on
</IfModule>

<IfModule mod_ctrls.c>
ControlsEngine        off
ControlsMaxClients    2
ControlsLog           /var/log/proftpd/controls.log
ControlsInterval      5
ControlsSocket        /var/run/proftpd/proftpd.sock
</IfModule>

<IfModule mod_ctrls_admin.c>
AdminControlsEngine off
</IfModule>

#
# Alternative authentication frameworks
#
[color=green]Include /etc/proftpd/ldap.conf[/color] - включить
#Include /etc/proftpd/sql.conf

#
# This is used for FTPS connections
#
#Include /etc/proftpd/tls.conf

#
# Useful to keep VirtualHost/VirtualRoot directives separated
#
#Include /etc/proftpd/virtuals.con

# A basic anonymous configuration, no upload directories.


 <Anonymous ~ftp>
   User ftp
   Group nogroup
   # We want clients to be able to login with "anonymous" as well as "ftp"
   UserAlias anonymous ftp
   # Cosmetic changes, all files belongs to ftp user
   DirFakeUser on ftp
   DirFakeGroup on ftp
 
   RequireValidShell off
 
   # Limit the maximum number of anonymous logins
   MaxClients 10
 
   # We want 'welcome.msg' displayed at login, and '.message' displayed
   # in each newly chdired directory.
   DisplayLogin welcome.msg
   DisplayChdir .message
 
   # Limit WRITE everywhere in the anonymous chroot
   <Directory *>
     <Limit WRITE>
       DenyAll
     </Limit>
   </Directory>

   <directory pub/*>
  <limit WRITE MKD>
    DenyAll
  </limit>
</directory>
#   # Uncomment this if you're brave.
#   # <Directory incoming>
#   #   # Umask 022 is a good standard umask to prevent new files and dirs
#   #   # (second parm) from being group and world writable.
#   #   Umask 022  022
#   #            <Limit READ WRITE>
#   #            DenyAll
#   #            </Limit>
#   #            <Limit STOR>
#   #            AllowAll
#   #            </Limit>
#   # </Directory>
#
 </Anonymous>

MaxLoginAttempts 5 "Количество попыток авторизации исчерпано"

поставить proftpd-mod-ldap
apt-get install proftpd-mod-ldapВ /etc/proftpd/modules.conf раскоментить

# Install proftpd-mod-ldap to use this
LoadModule mod_ldap.c

Вроде всё. И не надо машину в домен. Надо чтоб в ldap.conf были указаны правильные параметры юзера который может искать в AD (там я поставил !!!! ) . Если что есть инфа в моём блоге - retraut.co.cc
« Последнее редактирование: 08 Августа 2012, 18:26:27 от Retaut »

 

Страница сгенерирована за 0.035 секунд. Запросов: 27.