Estou tentando obter um ProFTPD para autenticação LDAP em uma base do Active Directory. Eu ainda não consegui descobrir o que poderia estar errado com a minha configuração desde então, executar uma consulta LDAP com ldapsearch
parece bem
proftpd.conf
/etc/proftpd.conf
# This is the ProFTPD configuration file
ServerName "FTP and Ldap"
ServerType standalone
ServerAdmin [email protected]
AuthOrder mod_ldap.c
LoadModule mod_ldap.c
DefaultServer on
ShowSymlinks on
RootLogin off
UseIPv6 off
AllowLogSymlinks on
IdentLookups off
UseReverseDNS off
Umask 077
User ftp
Group ftp
DefaultRoot /home/ftp/%u/
DefaultChDir ftp
RequireValidShell off
UseFtpUsers off
SystemLog /var/log/proftpd/proftpd.log
TransferLog /var/log/proftpd/xferlog
DefaultTransferMode binary
<IfModule mod_ldap.c>
LDAPServer domaincontroller.domain.net
LDAPAttr uid sAMAccountName
LDAPDNInfo cn=linux.ldap,ou=users,ou=resources,dc=domain,dc=net password
LDAPAuthBinds on
LDAPDoAuth on "dc=domain,dc=net" (&(sAMAccountName=%v)(objectclass=User))
LDAPQueryTimeout 15
LDAPGenerateHomedir on
LDAPGenerateHomedirPrefix /home/ftp
#uid e guid of the local global user
LDAPDefaultUID 14
LDAPDefaultGID 50
LDAPForceDefaultUID on
LDAPForceDefaultGID on
</IfModule>
<Directory /*>
AllowOverwrite on
</Directory>
proftpd -nd10 - > "pesquisa falhou"
Executando o proftpd com um nível de depuração de 10 recebi esses logs durante a autenticação com meu usuário ( nicolas
):
proftpd -nd10
dispatching CMD command 'PASS (hidden)' to mod_auth
mod_ldap/2.8.22: generated filter dc=domain,dc=net from template dc=domain,dc=net and value nicolas
mod_ldap/2.8.22: generated filter (&(sAMAccountName=nicolas)(objectclass=User)) from template (&(sAMAccountName=%v)(objectclass=User)) and value nicolas
mod_ldap/2.8.22: attempting connection to ldap://domaincontroller.domain.net/
mod_ldap/2.8.22: set protocol version to 3
mod_ldap/2.8.22: connected to ldap://domaincontroller.domain.net/
mod_ldap/2.8.22: successfully bound as cn=linux.ldap,ou=users,ou=resources,dc=domain,dc=net password
mod_ldap/2.8.22: set dereferencing to 0
mod_ldap/2.8.22: set query timeout to 15s
mod_ldap/2.8.22: pr_ldap_search(): LDAP search failed: Operations error
ldapsearch funciona
Mas ldapsearch
, por outro lado, funciona bem:
[root@ftp2 ~]# ldapsearch -x -W -D "cn=linux.ldap,ou=users,ou=resources,dc=domain,dc=net" -h domaincontroller.domain.net -b "dc=domain,dc=net" -LLL "(SAMAccountName=nicolas)"
Enter LDAP Password:
dn: CN=Nicolas XXXXXXX,OU=XXXXXXX,OU=XXXXXXX,OU=XXXXXXX,DC=XXXXXXX,DC=XXXXXXX
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
cn: Nicolas XXXXXXX
sn: XXXXXXX
description:XXXXXXX
givenName: XXXXXXX
distinguishedName:
Alguma pista?