[Koha] ldap and extended patron attributes

Heiko Weier h.weier at tuhh.de
Thu Jul 24 03:40:10 NZST 2014


Hi all,

we are testing Koha (3.16.01) with openldap and have an error with
extended patron attributes.

DBD::mysql::st execute failed: Unknown column 'preflang' in 'field list'
at /usr/share/koha/lib/C4/Auth_with_ldap.pm line 320, <DATA> line 522.

'preflang' is one of our extended attributes.

Mapping in koha-conf.xml is done.

intranet-error.log (with debug) shows all attribs and values from ldap
incuding the extended ones without failure.


When it comes to update the extended fields, the error shows up.

[Wed Jul 23 17:00:13 2014] [error] [client 192.168.56.1] [Wed Jul 23
17:00:13 2014] mainpage.pl: DBD::mysql::st execute failed: Unknown
column 'preflang' in 'field list' at /usr/share/koha/lib/C4/Auth_with
[Wed Jul 23 17:00:13 2014] [error] [client 192.168.56.1] [Wed Jul 23
17:00:13 2014] mainpage.pl: DBD::mysql::st execute failed: Unknown
column 'preflang' in 'field list' at /usr/share/koha/lib/C4/Auth_with


Can anybody help?


We patched  Auth_with_ldap.pm a bit, because passwords in our ldap are
stored with MD5. Maybe it is useful for others.

Insert at the top:

   use Digest::MD5 qw(md5_base64);

Search for this line:

   my $cmpmesg = $db->compare( $userldapentry, attr=>'userpassword',
value => $password );

exchange with this one

   my $cmpmesg = $db->compare( $userldapentry, attr=>'userpassword',
value => "{MD5}".md5_base64($password)."==" );


Regards

-- 

Heiko Weier           Technische Universität Hamburg-Harburg
Fachreferent          Bibliothek
Tel.: 040-42878-3449  Denickestr. 22
Fax.: 040-42878-2527  21073 Hamburg
WWW : http://www.tub.tu-harburg.de

PGP Key
http://www.tub.tu-harburg.de/ext/keys/Heiko_Weier_pub.asc
D8DF 3FFD 3910 AB1C 12D2 940B 65B6 2A73 524A 2C1E


More information about the Koha mailing list