I've seen a little information about LDAP support for Koha but nothing about setting it up or how to use it. If anyone could shed some light on this for me I'd appreciate it. Thanks Kent N
KL Nasveschuk a écrit :
I've seen a little information about LDAP support for Koha but nothing about setting it up or how to use it.
If anyone could shed some light on this for me I'd appreciate it.
In the modules/C4 directory, you'll find Auth_with_ldap.pm package open it with your text editor, modify it to fit your needs (ldap server & structure) then : * rename Auth.pm Auth_ini.pm * copy Auth_with_ldap.pm to Auth.pm It should work Note that when you upgrade your version, you have to copy manually your modified Auth_with_ldap & overwrite official Auth.pm once again. Don't forget to save somewhere the official auth.pm it can alway be useful. About upgrading : diff old_koha/Auth_ini.pm new_koha/Auth_ini.pm to see if some changes have been done between versions. It is really rare (only between 2.2.3 and 2.2.4 since 2.2.0) HTH -- Paul POULAIN Consultant indépendant en logiciels libres responsable francophone de koha (SIGB libre http://www.koha-fr.org)
Hi, Thanks for getting back to me. I know I have this setup wrong, but I'm close. I have Net::LDAP installed. Here is my Auth.pm with applicable sections that I changed: ################################################## ### 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 ); All my users are under ou=users,dc=tow,dc=net. ...... my $userdnsearch = $db->search(base => $name, filter =>"(uid=$userid)", I changed a-login to uid. Will that work? ...... my %borrower; $borrower{cardnumber} = $userid; $borrower{firstname} = $memberhash{givenName}; # MANDATORY FIELD $borrower{surname} = $memberhash{sn}; # MANDATORY FIELD $borrower{initials} = substr($borrower{firstname},0,1).substr($borrower{surname},0,1)." "; # MANDATORY FIELD $borrower{streetaddress} = $memberhash{homePostalAddress}." "; # MANDATORY FIELD $borrower{city} = $memberhash{l}." "; # MANDATORY FIELD $borrower{phone} = $memberhash{homePhone}." "; # MANDATORY FIELD $borrower{branchcode} = $memberhash{businessCategory}; # MANDATORY FIELD $borrower{emailaddress} = $memberhash{mail}; $borrower{categorycode} = $memberhash{employeeType}; I changed some of these to match what I have in LDAP. I was getting an error message in opac-error_log that said: [Fri Dec 09 13:45:46 2005] [error] [client 172.16.56.200] LDAP Auth impossible : wrong password at /usr/local/koha/intranet/modules/C4/Auth.pm line 471, <DATA> line 424., referer: http://172.16.60.186:8000/cgi-bin/koha/opac-user.pl Wrong passwd hash? Does it look like there are any problems with what is above as far as Koha mandatory fields to LDAP attributes? Thanks. Kent N On Thu, 2005-12-08 at 16:08 +0100, Paul POULAIN wrote:
KL Nasveschuk a écrit :
I've seen a little information about LDAP support for Koha but nothing about setting it up or how to use it.
If anyone could shed some light on this for me I'd appreciate it.
In the modules/C4 directory, you'll find Auth_with_ldap.pm package open it with your text editor, modify it to fit your needs (ldap server & structure) then : * rename Auth.pm Auth_ini.pm * copy Auth_with_ldap.pm to Auth.pm
It should work Note that when you upgrade your version, you have to copy manually your modified Auth_with_ldap & overwrite official Auth.pm once again.
Don't forget to save somewhere the official auth.pm it can alway be useful.
About upgrading : diff old_koha/Auth_ini.pm new_koha/Auth_ini.pm to see if some changes have been done between versions. It is really rare (only between 2.2.3 and 2.2.4 since 2.2.0)
HTH
KL Nasveschuk a écrit :
All my users are under ou=users,dc=tow,dc=net.
......
my $userdnsearch = $db->search(base => $name, filter =>"(uid=$userid)",
I changed a-login to uid. Will that work?
It depends ... I know that some LDAP servers uses a weak password to connect, and a ldapcompare on the true password, that just say "yes" or "no" when you suggest them a password. And some use login/password to connect, and that's all. But i'm not a LDAP specialist, so you should reach your ldap administrator to have some help (hoping you are not the ldap administrator ;-) ) -- Paul POULAIN Consultant indépendant en logiciels libres responsable francophone de koha (SIGB libre http://www.koha-fr.org)
participants (2)
-
KL Nasveschuk -
Paul POULAIN