[Koha-bugs] [Bug 10925] LDAP Auth fails if DEBUG is enable

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Sep 28 17:48:55 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10925

M. Tompsett <mtompset at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #21282|0                           |1
        is obsolete|                            |
                 CC|                            |mtompset at hotmail.com

--- Comment #4 from M. Tompsett <mtompset at hotmail.com> ---
Comment on attachment 21282
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21282
Bug 10925: LDAP auth fails if DEBUG is enable

Figured out how to test this....

I set up an LDAP server on my koha VM:
$ sudo apt-get install ldap-server
$ sudo slapcat
The second entry's 'dn' line will be important in setting up LDAP
authentication.

Made sure to set up the koha-conf.xml
 <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>demo.library.kohasystem.ca</hostname>
<base>dc=nodomain</base>
<user>CN=admin,OU=Special,OU=Accounts,DC=nodomain</user>
<pass>ldap123</pass>
<replicate>1</replicate>
<update>1</update>
<auth_by_bind>1</auth_by_bind>
<principal_name>CN=%s,DC=nodomain</principal_name>
<mapping>
<firstname    is='givenname'></firstname>
<surname      is='sn'> </surname>
<address      is='postaladdress'>3900 University Blvd</address>
<city         is='l'>Tyler, TX</city>
<zipcode      is='postalcode'>75799</zipcode>
<branchcode   is=''>MNL</branchcode>
<userid       is='cn'></userid>
<password     is=''></password>
<cardnumber   is='extensionattribute2'></cardnumber>
<email        is='userprincipalname'></email>
<categorycode is=''>PT</categorycode>
<phone        is='telephonenumber'>903-566-7343</phone>
<dateenrolled is=''>2011-03-27</dateenrolled>
<dateexpiry   is=''>2011-05-13</dateexpiry>
</mapping>
</ldapserver>

It is important to get the patron type and branch code to match something in
your DB. Notice the principle_name line is similar to the second entry's 'dn'
line.

And yes, I was lazy setting it up and used ldap123 as the password for the
admin account. And since I didn't know how to set up any other accounts, I just
used the admin account.

I then proceeded to log in using OPAC.

BEFORE PATCH:
#SetEnv DEBUG 1
delete patron
log in, log out, log in, log out (previously exist or not cases)
-- ALL GOOD!

SetEnv DEBUG 1
delete patron
log in, log in (previously exist or not cases)
-- ALL FAIL!


AFTER PATCH:
-- ALL GOOD!

Signed off. YAY!

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list