Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 86802 - proftpd wont connect to ldap server
Summary: proftpd wont connect to ldap server
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Luca Longinotti (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-26 14:06 UTC by Daniel 'Fremen' Llewellyn
Modified: 2006-09-23 17:17 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch against proftpd-1.2.10-r7.ebuild add use flag ldapv3bind (proftpd-1.2.10-r7.ebuild-ldapv3bind.patch,672 bytes, patch)
2005-10-31 21:48 UTC, Peter Fern
Details | Diff
Patch against proftpd-1.2.10-r7 to add v3 ldap binds without TLS (proftpd-ldapv3bind.patch,1.75 KB, patch)
2005-10-31 21:49 UTC, Peter Fern
Details | Diff
Patch against proftpd-1.2.10-r7 to add v3 ldap binds with standard TLS dependancy (proftpd-ldapv3bind-tls.patch,556 bytes, patch)
2005-10-31 21:51 UTC, Peter Fern
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel 'Fremen' Llewellyn 2005-03-26 14:06:54 UTC
when trying to log into my proftpd server using a username that is in LDAP I get a 530 error message saying "Login incorrect". Running the daemon with debugging enabled gets me this message:

"tank.mainframe.ath.cx (10.0.1.1[10.0.1.1]) - mod_ldap: pr_ldap_connect(): ldap_simple_bind() as cn=Manager,dc=mainframe,dc=ath.cx failed: Operations error"

The dn is correct, and the password in the configuration file is also correct for this dn.

Reproducible: Always
Steps to Reproduce:
1.configure proftpd to use ldap
2.start the daemon
3.try to login with a user that is in ldap
Actual Results:  
receive "530 Login incorrect" instead of logging into the ftp server with the 
credentials supplied. 

Expected Results:  
the directory should display using the credentials supplied 

proftpd version 1.2.10-r1 
openldap version 2.1.30-r4
Comment 1 Wayne Mitchell 2005-04-17 21:56:05 UTC
I am also experiencing this. When attempting to login I also receive this error message in the slapd log:

RESULT tag=97 err=2 text=requested protocol version not allowed

Versions of the proftpd mod_ldap module prior to 2.8.13 (current version in proftp-1.2.10-r1 appears to be 2.8.12) use LDAPv2. This seems to be what is causing the problem. 
Comment 2 Stian Skjelstad 2005-07-17 05:30:16 UTC
I don't have access to my gentoo machine right now, but I remember from some
ldap configure tutors, that they often add something like this into slapd config:

allow bind v2

Comment 3 Daniel 'Fremen' Llewellyn 2005-07-17 10:22:53 UTC
I am no longer trying to use this method of connecting, so I cannot confirm
whether this fixes the problem or not. I had no end of troublews with LDAP, so I
quit using it completely
Comment 4 Peter Fern 2005-10-31 21:40:29 UTC
The ldap module for proftpd does indeed attempt a v2 bind by default.  There is
a definition that can be uncommented in the source to allow v3 binds with SASL.
 I am running slapd on the same server as proftpd, so I don't require SASL, and
since the standard enabling of v3 binds fails if it can't initiate an SASL
connection, I've just enabled v3 binds without SASL.  See the attached patches
to the net-ftp/proftpd-1.2.10-r7 ebuild, to enable v3+sasl, just rename
proftpd-ldapv3bind-sasl.patch to proftpd-ldapv3bind.patch and use that instead
of the standard one.

Hope this helps some people, and the maintainer (gustavoz?) might want to have a
look at the patches (they're quite simple) and decide which/whether to include.

Comment 5 Peter Fern 2005-10-31 21:48:41 UTC
Created attachment 71845 [details, diff]
Patch against proftpd-1.2.10-r7.ebuild add use flag ldapv3bind
Comment 6 Peter Fern 2005-10-31 21:49:40 UTC
Created attachment 71846 [details, diff]
Patch against proftpd-1.2.10-r7 to add v3 ldap binds without TLS
Comment 7 Peter Fern 2005-10-31 21:51:13 UTC
Created attachment 71847 [details, diff]
Patch against proftpd-1.2.10-r7 to add v3 ldap binds with standard TLS dependancy
Comment 8 Peter Fern 2005-10-31 21:55:42 UTC
Umm, and just so you don't get confused, please s/SASL/TLS/g in all my previous
posts :P

Sorry bout that, slight brain malfunction...
Comment 9 Luca Longinotti (RETIRED) gentoo-dev 2006-09-23 17:17:56 UTC
Can you please try with proftpd-1.3.0-r2, if it still breaks without the patches? I don't have any OpenLDAP install where I could really test this... Thanks!
Best regards, CHTEKK.