[Koha] Koha Ldap Auth

Daniele Piccoli daniele.piccoli at riseup.net
Mon Jun 24 21:22:29 NZST 2019


Hi guys,

I've an instance of Koha in lab test and I'm trying to enable ldap auth
towards our active directory server (samba4 instance), but I'm
experiencing some issues.

Koha is correctly installed on an Ubuntu 16.04.6 LTS, fully updated.

I read and followed this page [0], step by step, without any problems.

Now, I've followed this step:

1. Open /etc/koha/sites/*biblioname*/koha-conf.xml
2. Enable LDAP: <useldapserver>1</useldapserver>
3. Insert settings as follow:

<ldapserver id="ldapserver"  listenref="ldapserver">
 <hostname>ldaps://*IP-OF-DC*</hostname>
 <base>ou=Users,dc=*sub*,dc=*domain*,dc=*tld*</base>
 <user>cn=*user*,dc=*sub*,dc=*domain*,dc=*tld*</user>
 <pass>*password*</pass>
 <replicate>1</replicate>
 <update>1</update>
 <auth_by_bind>1</auth_by_bind>
<principal_name>uid=%s,ou=*User*,dc=*sub*,dc=*domain*,dc=*tld*</principal_name>
  <mapping>record field names -->
   <userid       is="uid"></userid>
   <password     is="userpassword"></password>
   <email        is="mail"></email>
  </mapping>
</ldapserver>

4. Reload apache service

After that, when I try to open the OPAC interface as well as staff
interface, the follow errors appears:

OPAC URL:

Software error:
Error reading file /etc/koha/sites/biblioname/koha-conf.xml.
Try running this again as the koha instance user (or use the koha-shell
command in debian)

Compilation failed in require at /usr/share/koha/lib/C4/Auth.pm line 30.
BEGIN failed--compilation aborted at /usr/share/koha/lib/C4/Auth.pm line 30.
Compilation failed in require at
/usr/share/koha/opac/cgi-bin/opac/opac-main.pl line 23.
BEGIN failed--compilation aborted at
/usr/share/koha/opac/cgi-bin/opac/opac-main.pl line 23.
For help, please send mail to the webmaster ([no address given]), giving
this error message and the time and date of the error.


STAFF URL:

Software error:
Error reading file /etc/koha/sites/biblioname/koha-conf.xml.
Try running this again as the koha instance user (or use the koha-shell
command in debian)

Compilation failed in require at /usr/share/koha/lib/C4/Output.pm line 34.
BEGIN failed--compilation aborted at /usr/share/koha/lib/C4/Output.pm
line 34.
Compilation failed in require at
/usr/share/koha/intranet/cgi-bin/mainpage.pl line 24.
BEGIN failed--compilation aborted at
/usr/share/koha/intranet/cgi-bin/mainpage.pl line 24.
For help, please send mail to the webmaster ([no address given]), giving
this error message and the time and date of the error.


On the server side, the logs say:

[Mon Jun 24 10:55:57.310730 2019] [cgi:error] [pid 7006] [client
192.168.199.28:54800] AH01215: [Mon Jun 24 10:55:57 2019] mainpage.pl:
Compilation failed in require at
/usr/share/koha/intranet/cgi-bin/mainpage.pl line 24.:
/usr/share/koha/intranet/cgi-bin/mainpage.pl

[Mon Jun 24 10:55:57.310901 2019] [cgi:error] [pid 7006] [client
192.168.199.28:54800] AH01215: [Mon Jun 24 10:55:57 2019] mainpage.pl:
BEGIN failed--compilation aborted at
/usr/share/koha/intranet/cgi-bin/mainpage.pl line 24.:
/usr/share/koha/intranet/cgi-bin/mainpage.pl

[Mon Jun 24 10:55:57.826379 2019] [cgi:error] [pid 7009] [client
192.168.199.28:54802] AH01215: [Mon Jun 24 10:55:57 2019] 404.pl: :
/usr/share/koha/intranet/cgi-bin/errors/404.pl, referer: http://URL-OPAC/

[Mon Jun 24 10:55:57.826605 2019] [cgi:error] [pid 7009] [client
192.168.199.28:54802] AH01215: [Mon Jun 24 10:55:57 2019] 404.pl: Error
reading file /etc/koha/sites/biblioname/koha-conf.xml.:
/usr/share/koha/intranet/cgi-bin/errors/404.pl, referer: http://URL-OPAC/

[Mon Jun 24 10:55:57.826778 2019] [cgi:error] [pid 7009] [client
192.168.199.28:54802] AH01215: [Mon Jun 24 10:55:57 2019] 404.pl: Try
running this again as the koha instance user (or use the koha-shell
command in debian): /usr/share/koha/intranet/cgi-bin/errors/404.pl,
referer: http://URL-OPAC/

[Mon Jun 24 10:55:57.826827 2019] [cgi:error] [pid 7009] [client
192.168.199.28:54802] AH01215: [Mon Jun 24 10:55:57 2019] 404.pl: :
/usr/share/koha/intranet/cgi-bin/errors/404.pl, referer: http://URL-OPAC/

[Mon Jun 24 10:55:57.826956 2019] [cgi:error] [pid 7009] [client
192.168.199.28:54802] AH01215: [Mon Jun 24 10:55:57 2019] 404.pl:
Compilation failed in require at /usr/share/koha/lib/C4/Auth.pm line
30.: /usr/share/koha/intranet/cgi-bin/errors/404.pl, referer:
http://URL-OPAC/

[Mon Jun 24 10:55:57.827094 2019] [cgi:error] [pid 7009] [client
192.168.199.28:54802] AH01215: [Mon Jun 24 10:55:57 2019] 404.pl: BEGIN
failed--compilation aborted at /usr/share/koha/lib/C4/Auth.pm line 30.:
/usr/share/koha/intranet/cgi-bin/errors/404.pl, referer: http://URL-OPAC/

[Mon Jun 24 10:55:57.827243 2019] [cgi:error] [pid 7009] [client
192.168.199.28:54802] AH01215: [Mon Jun 24 10:55:57 2019] 404.pl:
Compilation failed in require at
/usr/share/koha/intranet/cgi-bin/errors/404.pl line 21.:
/usr/share/koha/intranet/cgi-bin/errors/404.pl, referer: http://URL-OPAC/

[Mon Jun 24 10:55:57.827397 2019] [cgi:error] [pid 7009] [client
192.168.199.28:54802] AH01215: [Mon Jun 24 10:55:57 2019] 404.pl: BEGIN
failed--compilation aborted at
/usr/share/koha/intranet/cgi-bin/errors/404.pl line 21.:
/usr/share/koha/intranet/cgi-bin/errors/404.pl, referer: http://URL-OPAC/


Any hints?

Thanks,
Daniele

[0] https://wiki.koha-community.org/wiki/Koha_on_ubuntu_-_packages


More information about the Koha mailing list