[Koha] LDAP authentication

Bruno Marmol Bruno.Marmol at inrialpes.fr
Thu Dec 15 03:46:20 NZDT 2005


KL Nasveschuk <klnasveschuk at klnconsulting.net> writes:

> Hello,
>
> I'm still trying to get LDAP authentication to work on Koha. I've
> modified Auth.pm with the following:
>
>  ##################################################
>         ### LOCAL
>         ### Change the code below to match your own LDAP server.
>         ##################################################
>         # LDAP connexion parameters
>         my $ldapserver = '172.16.0.24';
>         # Infos to do an anonymous bind
>         my $ldapinfos = 'ou=users,dc=tow,dc=net ';
>         my $name  = "ou=users,dc=tow,dc=net";
>         my $db = Net::LDAP->new( $ldapserver );
>
>         # do an anonymous bind
>         my $res =$db->bind();

For testing the ldap passwd here, I need to patch this code to not to do an
anonymous bind. I don't use the compare() fonction.  I just do:

        my $res =$db->bind( "uid=$userid,$name",password => $password);
	# check connexion
	if($res->code) {
		# auth refused
		#warn "LDAP Auth: not binded";
		return 0;
                }

-- 
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