Bug 8123 - Cronjob to pre-populate/update patrons using LDAP
Summary: Cronjob to pre-populate/update patrons using LDAP
Status: RESOLVED WISHLIST
Alias: None
Product: Koha
Classification: Unclassified
Component: Authentication (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Galen Charlton
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-18 14:17 UTC by laurenthdl
Modified: 2022-08-22 03:25 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
proposed patch (3.87 KB, patch)
2012-05-18 14:23 UTC, laurenthdl
Details | Diff | Splinter Review
proposed patch (4.78 KB, patch)
2012-05-18 14:58 UTC, laurenthdl
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description laurenthdl 2012-05-18 14:17:20 UTC
It would be really nice to have borrowers table prepopulated and updated from LDAP data.
Comment 1 laurenthdl 2012-05-18 14:23:37 UTC Comment hidden (obsolete)
Comment 2 laurenthdl 2012-05-18 14:58:28 UTC
Created attachment 9642 [details] [review]
proposed patch

This patch now contains no french and a brief documentation of the script.
Comment 3 Derryn 2012-11-30 04:00:30 UTC
Doesn't seem work for me.

Got the following:

Got 12 ldap mapkeys (  total  ): firstname userid categorycode zipcode surname dateexpiry email city password cardnumber address branchcode 
Got 12 ldap mapkeys (populated): firstname userid categorycode zipcode surname dateexpiry email city password cardnumber address branchcode 
---
auth_by_bind: 1
base: 'dc=server,dc=local'
hostname: 192.168.1.1
id: ldapserver
listenref: ldapserver
mapping:
  address:
    is: postaladdress
  branchcode:
    content: LIBRARY
    is: ''
  cardnumber:
    is: description
  categorycode:
    is: physicalDeliveryOfficeName
  city:
    is: l
  dateexpiry:
    content: 2099-05-13
    is: ''
  email:
    is: mail
  firstname:
    is: givenname
  password:
    is: ''
  surname:
    is: sn
  userid:
    is: samaccountname
  zipcode:
    is: postalcode
pass: password
principal_name: '%s@server.local'
replicate: 1
update: 1
user: 'LDAPUSER@server.local'

After that, nothing happens. No users are added/updated, i've set it to highest debugging level and I still cant find any error logs from it.

Does it scan OUs recursively ? So my base is dc=server,dc=local - Will it find users in ou=users, ou=staff, ou=dept, dc=wbta, dc=local
Comment 4 Derryn 2012-11-30 04:04:57 UTC
Oh and that's on Koha 3.8.6 with authentication to a Windows 2008 server via LDAP
Comment 5 David Cook 2022-08-22 03:25:27 UTC
It's an interesting idea but it's been over 10 years with no movement, and I don't know that a cronjob would make sense. Perhaps a migration script...