ProFTP não encontra usuários LDAP

ProFTP não encontra usuários LDAP

Quero fazer login com LDAP no meu FTP. Com o arquivo conf:

<IfModule mod_ldap.c>
        LDAPLog /var/log/proftpd/ldap.log
        LDAPProtocolVersion 3
        DebugLevel 3
        LDAPAuthBinds on

        LDAPServer ldap://localhost
        LDAPBindDN "cn=admin,dc=example,dc=com" "pass"
        LDAPUsers "ou=example.com,ou=Domains,dc=example,dc=com" "(uid=%u)"

        LDAPSearchScope subtree

        LDAPGenerateHomedir off
        LDAPGenerateHomedirPrefix /var/mediaserver
</IfModule>

Registrando com o usuário user2

# user2, example.com, Domains, example.com
dn: uid=user2,ou=example.com,ou=Domains,dc=example,dc=com
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: top
objectClass: qmailUser
cn: yann example
mail: [email protected]
sn: Gailard
qmailGID: 5000
qmailUID: 5000
uid: user2
userPassword:: e1NTSEF9NXJNTS8zZjhLaTEzSXlhckdUdHd6aWVvVHU3S01nd2M=
mailMessageStore: /var/vmail/example.com/user2/

o registro diz

2020-08-22 17:53:15,397 mod_ldap/2.9.4[42030]: generated filter ou=example.com,ou=Domains,dc=example,dc=com from template ou=example.com,ou=Domains,dc=example,dc=com and value user2
2020-08-22 17:53:15,397 mod_ldap/2.9.4[42030]: generated filter (uid=user2) from template (uid=%u) and value user2
2020-08-22 17:53:15,398 mod_ldap/2.9.4[42030]: attempting connection to URL ldap://localhost
2020-08-22 17:53:15,398 mod_ldap/2.9.4[42030]: set LDAP protocol version to 3
2020-08-22 17:53:15,398 mod_ldap/2.9.4[42030]: connected to URL ldap://localhost
2020-08-22 17:53:15,400 mod_ldap/2.9.4[42030]: successfully bound as DN 'cn=admin,dc=example,dc=com' with password (see config)
2020-08-22 17:53:15,400 mod_ldap/2.9.4[42030]: set dereferencing to 0
2020-08-22 17:53:15,400 mod_ldap/2.9.4[42030]: set query timeout to 5 secs
2020-08-22 17:53:15,400 mod_ldap/2.9.4[42030]: searched under base DN ou=example.com,ou=Domains,dc=example,dc=com using filter (uid=user2)
2020-08-22 17:53:15,400 mod_ldap/2.9.4[42030]: no entries for filter (uid=user2) under base DN ou=example.com,ou=Domains,dc=example,dc=com
2020-08-22 17:53:19,361 mod_ldap/2.9.4[42030]: connection successfully unbound
2020-08-22 17:53:19,362 mod_ldap/2.9.4[42030]: not unbinding to an already unbound connection

Eu realmente não sei por que o proftp não encontra o usuário2. Estou usando o CentOS7

Responder1

O problema foi completamente diferente do que diz o registro. Ative SystemLog /var/log/proftpd/proftpd.logpara problemas de registro apropriados. Eu desativo a autenticação unix e pam e deixo apenas a autenticação ldap.

informação relacionada