[Koha] LDAP support 2.2.4&In-Reply-To=43984C55.1030907@free.fr

Bruno Marmol Bruno.Marmol at inrialpes.fr
Thu Mar 2 21:38:29 NZDT 2006


"Mark Flach" <mwflach at prometa.or.cr> writes:

> Did you ever get LDAP to work on Koha?  I'm getting the same password
> error.

Yes, but there was some post on the same subject on the list...

Here is a piece of code to fix the problem.  The original code try to do an
anonymous bind...  Replace with a bind with the user/passwd

	
	my $db = Net::LDAP->new( $ldapserver );

        if (!defined($db)) {
	    print STDERR "Can not create LDAP object!\n";
	    return 0;
	};
=>	my $res =$db->bind( "uid=$userid,$name",password => $password);
	
	# check connexion
	if($res->code) {
		# auth refused
		#warn "LDAP Auth: not binded";
		return 0;
	# search user
	} else { ...

I suppose it will work after...

Hope that help

-- 
Bruno Marmol.

Ingénieur à la Direction Information Scientifique et de la communication

Email: Bruno.Marmol at Inrialpes.Fr - Tel: 04 76 61 53 04 - Fax: 04 76 61 52 52
Inria Rhône Alpes.    
ZIRST - 655 Av de l'Europe.  - Montbonnot St Martin 
38334 St Ismier Cedex - France



More information about the Koha mailing list