<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>ldaps://10.16.1.1</hostname>
<base>ou=schools,dc=linuxmuster,dc=lan</base>
<user>cn=global-binduser,ou=Management,ou=GLOBAL,dc=linuxmuster,dc=lan</user><!-- DN, if not anonymous -->
<pass>supergeheim</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 -->
<anonymous_bind>0</anonymous_bind>
<auth_by_bind>1</auth_by_bind> <!-- set to 1 to authenticate by binding instead of password comparison, e.g., to use A$
<principal_name>%s@linuxmuster.lan</principal_name>
<update_password>0</update_password>
<!-- optional, for auth_by_bind: a printf format to make userPrincipalName from koha userid -->
<mapping> <!-- match koha SQL field names to your LDAP record field names -->
<userid is="samAccountName"></userid>
<email is="mail"></email>
</mapping>
</ldapserver>
wenn ich den ausführe mit der modifikation bibliothek kommt das :
root@koha-rbs:/etc/koha/sites/bibliothek# export PERL5LIB=/usr/share/koha/lib/ && export KOHA_CONF=/etc/koha/sites/bibliothek/koha-conf.xml && perl /usr/share/koha/opac/cgi-bin/opac/opac-user.pl userid=user1 password=foo
Error reading file /etc/koha/sites/bibliothek/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-user.pl line 24.
BEGIN failed--compilation aborted at /usr/share/koha/opac/cgi-bin/opac/opac-user.pl line 24.
root@koha-rbs:/etc/koha/sites/bibliothek#
Hmm…ehrlich gesagt, sieht mir das eher nach einem Syntaxfehler in deiner koha-conf.xml aus. Kannst du mal die ganze koha-conf.xml schicken (gern auch als DM/PM)?
jetzt habe ich nur noch das Problem mit dem anmelden
wenn sich ein User anmeldet bekommt er diesen Fehler:
Software error:
Broken FK constraint
Hier ist nochmal meine LDAP Conf aus Koha ich habe sie mal erweitert um weitere mappings hat leider keinen Effekt
Wenn ich <replicate>1</replicate>
abschalte dann meldet koha bei der Anmeldung immer falsches Passwort aber der Broken FK constraint fehler ist weg
<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://10.16.1.1</hostname>
<base>ou=schools,dc=linuxmuster,dc=lan</base>
<user>cn=global-binduser,ou=Management,ou=GLOBAL,dc=linuxmuster,dc=lan</user><!-- DN, if not anonymous -->
<pass>totalgeheim</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 -->
<anonymous_bind>0</anonymous_bind>
<auth_by_bind>1</auth_by_bind> <!-- set to 1 to authenticate by binding instead of password comparison, e.g., to use A$ -->
<principal_name>%s@linuxmuster.lan</principal_name>
<update_password>0</update_password>
<!-- optional, for auth_by_bind: a printf format to make userPrincipalName from koha userid -->
<mapping> <!-- match koha SQL field names to your LDAP record field names -->
<userid is="samAccountName"></userid>
<email is="mail"></email>
<categorycode is="employeetype">S</categorycode>
<firstname is="givenname"></firstname>
<password is="userpassword"></password>
<surname is="sn"></surname>
</mapping>
Ich weiß nicht, ob LMN diesen Wert im AD hat, aber falls ja, ist das ein Problem hier, wenn du den Wert von employeetype nicht als category code in Koha hast.
Kannst du mal <update>1</update> auf 0 setzen?
vG Stephan
PS: Die Koha Mailingliste ist i.d.R. auch sehr gut, wenn du weitere Hilfe brauchst.
also wenn ich update auf 0 stelle aber replicate auf 1 kommt
Broken FK constraint
wenn ich beides auf 0 stelle kommt falsches passwort
Wo finde ich den Catergory Code in Koha bzw wo muss ich ihn setzen ?
Und wie sehe ich ob ich den Wert employeetype in der LMN habe? bzw gibt es einen alternativen wert vieleicht eine art gruppenzugehörigkeit ?
Du kannst das employeetype einfach weglassen. Also <categorycode is="">S</categorycode>. Category Code sind die Benutzertypen, die du in Koha festgelegt hast (bzw. deren Abkürzungen).
ich habe den categorycode wieder geändert aber was ich noch nicht so ganz verstehe ist wenn ich replicant auf 0 stelle legt er ja keine nutzer an wenn die sich das erste mal anmelden. Wenn ich jetzt die user per csv importiere können sich die user dann trotzdem mit ihrem ldap passwort anmelden?
also dient die ldap anbindung in meiner konstellation dann dafür das nur überprüft wird das das kennwort korrekt ist ? oder verstehe ich da etwas falsch?
Ja, ich lege alle User mit irgendeinem (Zufalls)passwort an. Sie können sich dann über LDAP mit ihrem eigentlichen Passwort anmelden. Wenn du LDAP einrichtest, versucht er die User erst über LDAP zu authentifizieren und wenn das nicht klappt, lokal.
Dein Fehler mit den Broken FK contraint ist seltsam. Ich würde mich damit mal an die Mailingliste bzw IRC Chat wenden.
Pflichtfelder: Die Felder ‚surname‘, ‚branchcode‘ und ‚categorycode‘ sind Erforderlich und ‚branchcode‘ und ‚categorycode‘ muss übereinstimmen gültige Einträge in der Datenbank
Wir haben noch userId und dateofbirth dabei.
Ja, ich habe ein Skript, aber als Quelle nutze ich nicht die Liste der LMN (zu wenig Infos), sondern unsere Schülerverwaltungssoftware.