RE: ldap_simple_bind_s failed protocol error

"Richard Williams" <[email protected]>
Newsgroups gmane.mail.jamm.user
Organization R V Williams
Message-ID <000001c42483$e3bd3480$0400a8c0@WIN2000>
Hi Dave

Thanks for your further help.  I've checked the points you made but the only
fault I could find was in authdaemonrc where I've set version to
authdaemond.ldap.  My settings for authldaprc look very similar to yours.
This is what mine looks like (formatting slightly messed up due to cut and
paste.  I've checked that all the spaces are in fact tabs):

##VERSION: $Id: authldaprc,v 1.18 2003/05/09 18:15:15 mrsam Exp $
#
# Copyright 2000-2001 Double Precision, Inc.  See COPYING for
# distribution information.
#
# Do not alter lines that begin with ##, they are used when upgrading
# this configuration.
#
# authldaprc created from authldaprc.dist by sysconftool
#
# DO NOT INSTALL THIS FILE with world read permissions.  This file
# might contain the LDAP admin password!
#
# This configuration file specifies LDAP authentication parameters
#
# The format of this file must be as follows:
#
# field[spaces|tabs]value
#
# That is, the name of the field, followed by spaces or tabs, followed by
# field value.  No trailing spaces.
#
# Here are the fields:

##NAME: LOCATION:0
#
# Location of your LDAP server:

#LDAP_SERVER		localhost.localdomain
LDAP_SERVER		192.168.0.200
LDAP_PORT		389

##NAME: LDAP_BASEDN:0
#
# Look for authentication here:

LDAP_BASEDN		o=hosting,dc=example,dc=com

##NAME: LDAP_BINDDN:0
#
# You may or may not need to specify the following.  Because you've got
# a password here, authldaprc should not be world-readable!!!

#LDAP_BINDDN		cn=administrator, o=localhost, c=localdomain
#LDAP_BINDPW		toto

##NAME: LDAP_TIMEOUT:0
#
# Timeout for LDAP search

LDAP_TIMEOUT		5

##NAME: LDAP_AUTHBIND:0
#
# Define this to have the ldap server authenticate passwords.  If
LDAP_AUTHBIND
# the password is validated by rebinding with the supplied userid and
password.
# If rebind succeeds, this is considered to be an authenticated request.
This
# does not support CRAM-MD5 authentication, which requires userPassword.
#
LDAP_AUTHBIND		1

##NAME: LDAP_MAIL:0
#
# Here's the field on which we query

LDAP_MAIL		mail

##NAME: LDAP_FILTER:0
#
# This LDAP filter will be ANDed with the query for the field defined above
# in LDAP_MAIL.  So if you are querying for mail, and you have LDAP_FILTER
# defined to be "(objectClass=CourierMailAccount)" the query that is
performed
# will be "(&(objectClass=CourierMailAccount)(mail=<someAccount>))"
#
# LDAP_FILTER           (objectClass=CourierMailAccount)
LDAP_FILTER
(objectClass=JammMailAccount)(accountActive=TRUE)(delete=FALSE)

##NAME: LDAP_DOMAIN:0
#
# The following default domain will be appended, if not explicitly
specified. 
#
# LDAP_DOMAIN		example.com

##NAME: LDAP_GLOB_IDS:0
#
# The following two variables can be used to set everybody's uid and gid.
# This is convenient if your LDAP specifies a bunch of virtual mail accounts
# The values can be usernames or userids:
#
LDAP_GLOB_UID		vmail
LDAP_GLOB_GID		vmail

##NAME: LDAP_HOMEDIR:0
#
# We will retrieve the following attributes
#
# The HOMEDIR attribute MUST exist, and we MUST be able to chdir to it

LDAP_HOMEDIR		homeDirectory

##NAME: LDAP_MAILROOT:0
#
# If homeDirectory is not an absolute path, define the root of the
# relative paths in LDAP_MAILROOT
#
#LDAP_MAILROOT		/home/vmail/domains/


##NAME: LDAP_MAILDIR:0
#
# The MAILDIR attribute is OPTIONAL, and specifies the location of the
# mail directory.  If not specified, ./Maildir will be used

LDAP_MAILDIR		mailbox

##NAME: LDAP_DEFAULTDELIVERY:0
#
# Courier mail server only: optional attribute specifies custom mail
delivery
# instructions for this account (if defined) -- essentially overrides
# DEFAULTDELIVERY from ${sysconfdir}/courierd

LDAP_DEFAULTDELIVERY	defaultDelivery

##NAME: LDAP_MAILDIRQUOTA:0
#
# The following variable, if defined, specifies the field containing the
# maildir quota, see README.maildirquota for more information
#
# LDAP_MAILDIRQUOTA	quota


##NAME: LDAP_FULLNAME:0
#
# FULLNAME is optional, specifies the user's full name

LDAP_FULLNAME		cn

##NAME: LDAP_PW:0
#
# CLEARPW is the clear text password.  CRYPT is the crypted password.
# ONE OF THESE TWO ATTRIBUTES IS REQUIRED.  If CLEARPW is provided, and
# libhmac.a is available, CRAM authentication will be possible!

LDAP_CLEARPW		clearPassword
LDAP_CRYPTPW		userPassword

##NAME: LDAP_IDS:0
#
# Uncomment the following, and modify as appropriate, if your LDAP database
# stores individual userids and groupids.  Otherwise, you must uncomment
# LDAP_GLOB_UID and LDAP_GLOB_GID above.  LDAP_GLOB_UID and LDAP_GLOB_GID
# specify a uid/gid for everyone.  Otherwise, LDAP_UID and LDAP_GID must
# be defined as attributes for everyone.
#
# LDAP_UID		uidNumber
# LDAP_GID		gidNumber

##NAME: LDAP_DEREF:0
#
# Determines how aliases are handled during a search.  This option is
available
# only with OpenLDAP 2.0
#
# LDAP_DEREF can be one of the following values:
# never, searching, finding, always. If not specified, aliases are
# never dereferenced.

LDAP_DEREF		never

##NAME: LDAP_TLS:0
#
# Set LDAP_TLS to 1 to enable LDAP over SSL/TLS.  Experimental setting.
# Requires OpenLDAP 2.0
#

LDAP_TLS		0

##NAME: LDAP_EMAILMAP:0
#
# The following optional settings, if enabled, result in an extra LDAP
# lookup to first locate a handle for an E-mail address, then a second
lookup
# on that handle to get the actual authentication record.  You'll need
# to uncomment these settings to enable an email handle lookup.
#
# The E-mail address must be of the form user@realm, and this is plugged
# into the following search string.  "@user@" and "@realm@" are placeholders
# for the user and the realm portions of the login ID.
#
# LDAP_EMAILMAP		(&(userid=@user@)(realm=@realm@))

##NAME: LDAP_EMAILMAP_BASEDN:0
#
# Specify the basedn for the email lookup.  The default is LDAP_BASEDN.
#
# LDAP_EMAILMAP_BASEDN	o=emailmap, c=com


##NAME: LDAP_EMAILMAP_ATTRIBUTE:0
#
# The attribute which holds the handle.  The contents of this attribute
# are then plugged into the regular authentication lookup, and you must set
# LDAP_EMAILMAP_MAIL to the name of this attribute in the authentication
# records (which may be the same as LDAP_MAIL).
# You MUST also leave LDAP_DOMAIN undefined.  This enables authenticating
# by handles only.
#
# Here's an example:
#
# dn: userid=john, realm=example.com, o=emailmap, c=com #
LDAP_EMAILMAP_BASEDN
# userid: john          # LDAP_EMAILMAP search
# realm: example.com    # LDAP_EMAILMAP search
# handle: cc223344      # LDAP_EMAILMAP_ATTRIBUTE
#
#
# dn: controlHandle=cc223344, o=example, c=com      # LDAP_BASEDN
# controlHandle: cc223344         # LDAP_EMAILMAP_MAIL set to
"controlHandle"
# uid: ...
# gid: ...
# [ etc... ]
#
# LDAP_EMAILMAP_ATTRIBUTE handle

##NAME: LDAP_EMAILMAP_MAIL:0
#
# After reading LDAP_EMAIL_ATTRIBUTE, the second query will go against
# LDAP_BASEDN, but will key against LDAP_EMAILMAP_MAIL instead of LDAP_MAIL.
#
# LDAP_EMAILMAP_MAIL mail

I'm reasonably sure that the basic LDAP settings are OK as Postfix accepts
incoming mail for the virtual domain and creates the appropriate stuff in
/home/vmail/domains.

I can Telnet to the server on port 110 and validate local (non-virtual)
users OK and do stuff with the mailbox.  However, trying the same with a
virtual user still gives the log on not accepted error.

If there's something more you can do to point me in the right direction to
crack this, I'd be most grateful.

Regards

Richard.

****************************************************
Richard Williams
email: [email protected]
****************************************************


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Keith T. Garner
Sent: Thursday, April 15, 2004 5:29 PM
To: [email protected]
Subject: Re: [Jamm-users] ldap_simple_bind_s failed protocol error

On Thu, Apr 15, 2004 at 09:29:33, Richard Williams said:
> Hi Dave
> 
> Thanks for this response.  Your suggestion has got rid of the protocol
error
> message.  However my email client is still not authenticating and now
there
> aren't any messages in any of the logs to help identify the problem.
> 
> I've tried starting slapd with various debug settings (-d x) and I can see
> that the JAMM schema is being called up and the details I entered for the
> account are visible, including the password.  However, I don't understand
> enough of what the debug screen is showing to be able to progress any
> further.

I'd go over every line if your courier ldap config again and confirm
that in courier you're running authdeamon.ldap.  Also, make sure
you're using AUTH_BIND in courier.

My authldaprc looks something like this:

LDAP_SERVER     localhost
LDAP_PORT       389
LDAP_BASEDN     o=your,o=base,o=dn
LDAP_TIMEOUT        5
LDAP_AUTHBIND       1
LDAP_MAIL       mail
LDAP_FILTER (objectClass=JammMailAccount)(accountActive=TRUE)(delete=FALSE)
LDAP_GLOB_UID       vmail
LDAP_GLOB_GID       vmail
LDAP_HOMEDIR        homeDirectory
LDAP_MAILDIR        mailbox
LDAP_CRYPTPW        userPassword

Keith

-- 
  Keith T. Garner
[email protected]
   The whole problem with the world is that fools and fanatics are always so
 certain of themselves, and wiser people so full of doubts. --Bertrand
Russell


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Jamm-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jamm-users




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.