[Koha] Fwd: Fwd: openldap

Andreas Schultze aschultze at online.de
Wed May 9 22:18:14 NZST 2018


Hi Chris,
Thank you , that was the right hint
I have set in the meantime
<branch code is = ""> MPL </ branchcode>

Now my LDAP connection works fine :-)

Thank you and best regards
Andreas

> Anfang der weitergeleiteten Nachricht:
> 
> Von: Chris Cormack <chrisc at catalyst.net.nz>
> Betreff: Aw: [Koha] Fwd: openldap
> Datum: 9. Mai 2018 um 11:59:58 MESZ
> An: koha at lists.katipo.co.nz
> 
> Thats telling you don't have a branchcode mapped, and no default defined
> (or it is mapped by doesn't match a branchcode in the db)
>      <branchcode   is="branch"         >MAIN</branchcode>
> 
> For example
> 
> Chris
> 
> On 09/05/18 19:32, Andreas Schultze wrote:
>> Hi Chris,
>> Thank you for your answer.
>> <categorycode is="">ST</categorycode> is working
>> 
>> But now I have a problem with entering into the database
>> 
>> 
>> 
>> 
>> /usr/share/koha/opac/cgi-bin/opac/opac-user.pl userid=anna password=####
>> DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`koha_nw`.`borrowers`, CONSTRAINT `borrowers_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)) [for Statement "INSERT INTO `borrowers` ( `branchcode`, `cardnumber`, `categorycode`, `dateenrolled`, `dateexpiry`, `dateofbirth`, `debarred`, `email`, `guarantorid`, `initials`, `password`, `privacy`, `privacy_guarantor_checkouts`, `sms_provider_id`, `userid`) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" with ParamValues: 0="TYLER", 1=' ', 2="ST", 3="2019-07-01", 4="2019-09-01", 5=undef, 6=undef, 7='anna at nwschule.de <mailto:7='anna at nwschule.de>', 8=undef, 9=' ', 10='$2a$08$YYhbT6xQ.oibdpEUvojdpuT.jp7IewumfmzwCt5Ur/.5iRvtPcx/.', 11=1, 12=1, 13=undef, 14='anna'] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1836, <DATA> line 755.
>> DBIx::Class::Storage::DBI::_dbh_execute(): Cannot add or update a child row: a foreign key constraint fails (`koha_nw`.`borrowers`, CONSTRAINT `borrowers_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)) at /usr/share/koha/lib/Koha/Object.pm line 121
>> 
>> could you help me ?
>> 
>> Thank you and best regards
>> Andreas
>> 
>> 
>> 
>> 
>>> Anfang der weitergeleiteten Nachricht:
>>> 
>>> Von: Chris Cormack <chrisc at catalyst.net.nz <mailto:chrisc at catalyst.net.nz>>
>>> Betreff: Aw: [Koha] openldap
>>> Datum: 9. Mai 2018 um 08:42:41 MESZ
>>> An: koha at lists.katipo.co.nz <mailto:koha at lists.katipo.co.nz>
>>> 
>>> Hi Andreas
>>> 
>>> If you look here
>>> 
>>> https://perldoc.koha-community.org/C4/Auth_with_ldap.html#KOHA_CONF_and_field_mapping <https://perldoc.koha-community.org/C4/Auth_with_ldap.html#KOHA_CONF_and_field_mapping>
>>> 
>>> You can see an example of how to set a default category code
>>> Chris
>>> 
>>> 
>>> On 09/05/18 18:08, Andreas Schultze wrote:
>>>> Hi Jonathan,
>>>> Thank you for your answer, unfortunately I do not quite understand this. It is the first login of an LDAP user, which is not yet available in the system.
>>>> Is there a way to set the categorycode.
>>>> 
>>>> <install_log>/usr/share/koha/misc/koha-install-log</install_log>
>>>> <useldapserver>1</useldapserver><!-- see C4::Auth_with_ldap for extra configs you must add if you want to turn this on -->
>>>> <ldapserver id="ldapserver"  listenref="ldapserver">
>>>>   <hostname>ldap://debian.nwschule.de <ldap://debian.nwschule.de></hostname>
>>>>   <base>ou=people,dc=nwschule,dc=de</base>
>>>>   <user></user><!-- DN, if not anonymous -->
>>>>   <pass></pass><!-- password, if not anonymous -->
>>>>   <replicate>1</replicate>       <!-- add new users from LDAP to Koha database -->
>>>>   <update>1</update>             <!-- update existing users in Koha database -->
>>>>   <auth_by_bind>0</auth_by_bind> <!-- set to 1 to authenticate by binding instead of password comparison, e.g., to use A$ -->
>>>>   <anonymous_bind>1</anonymous_bind>
>>>>   <!--    <principal_name></principal_name> -->
>>>>     <mapping>             <!-- match koha SQL field names to your LDAP record field names -->
>>>>       <userid       is="uid"></userid>
>>>>       <password     is="userpassword"></password>
>>>>       <email        is="mail"></email>
>>>>       <dateexpiry is="">2019-09-01</dateexpiry>
>>>>       <dateenrolled is="">2019-07-01</dateenrolled>
>>>>    </mapping>
>>>> </ldapserver>
>>>> 
>>>> 
>>>> 
>>>> Thank you and best regards
>>>> Andreas
>>>> 
>>>>> Am 08.05.2018 um 15:18 schrieb Jonathan Druart <jonathan.druart at bugs.koha-community.org <mailto:jonathan.druart at bugs.koha-community.org>>:
>>>>> 
>>>>> Hi Andreas,
>>>>> 
>>>>> It seems that the category (categorycode) you use for this patron does not exist.
>>>>> 
>>>>> Regards,
>>>>> Jonathan
>>>>> 
>>>>> 
>>>>> On Tue, 8 May 2018 at 04:26 Andreas Schultze <aschultze at online.de <mailto:aschultze at online.de>> wrote:
>>>>> Hallo,
>>>>> I have a problem with the ldap connection on Debian9 Server.
>>>>> User authentication works but I can not log in with an ldap user.
>>>>> 
>>>>> I receive the following error message:
>>>>> /usr/share/koha/opac/cgi-bin/opac/opac-user.pl <http://opac-user.pl/> userid=#### password=####
>>>>> Can't call method "default_privacy" on an undefined value at /usr/share/koha/lib/C4/Members.pm line 416, <DATA> line 755.
>>>>> 
>>>>> Thank you and best regards
>>>>> Andreas
>>>>> _______________________________________________
>>>>> Koha mailing list  http://koha-community.org <http://koha-community.org/>
>>>>> Koha at lists.katipo.co.nz <mailto:Koha at lists.katipo.co.nz>
>>>>> https://lists.katipo.co.nz/mailman/listinfo/koha <https://lists.katipo.co.nz/mailman/listinfo/koha>
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Koha mailing list  http://koha-community.org
>>>> Koha at lists.katipo.co.nz
>>>> https://lists.katipo.co.nz/mailman/listinfo/koha
>>>> 
>>> _______________________________________________
>>> Koha mailing list  http://koha-community.org
>>> Koha at lists.katipo.co.nz
>>> https://lists.katipo.co.nz/mailman/listinfo/koha
>> 
>> 
>> 
>> _______________________________________________
>> Koha mailing list  http://koha-community.org
>> Koha at lists.katipo.co.nz
>> https://lists.katipo.co.nz/mailman/listinfo/koha
>> 
> _______________________________________________
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> https://lists.katipo.co.nz/mailman/listinfo/koha

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: Message signed with OpenPGP
URL: <https://lists.katipo.co.nz/pipermail/koha/attachments/20180509/f5888120/attachment.sig>


More information about the Koha mailing list