[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-win32] Re: [Koha] LDAP authentication -- Joy!.....
From: |
Scott Owen |
Subject: |
[Koha-win32] Re: [Koha] LDAP authentication -- Joy!..... |
Date: |
Fri, 10 Oct 2008 10:38:34 -0400 |
User-agent: |
Thunderbird 1.5.0.13 (Windows/20070809) |
Hi all,
Just answering the my own issue for list(s) consumption, maybe it'll
help someone in the future.
(since it looks like win32 users may be stuck on 2.2.9 for a while...)
I switched back to the css them (I was using the npl), and LDAP
authentication started working MUCH more like I expected.
I was able to pretty much just copy the script changes from
http://wiki.koha.org/doku.php?id=ldap&s=ldap
and Ta! Da! I had working LDAP authentication
(a BIG thanks to whoever wrote and posted this script to the wiki...it
worked perfectly!)
I made a couple modifications (see below) to allow users in different
contexts to login.
In my case I have a O=SCHOOL and two OU's ou=students and ou=staff.
##################################################
### LOCAL
### Change the code below to match your own LDAP server.
##################################################
# LDAP connection parameters
# LDAP server
my $ldapserver = '10.1.1.7';
# Base DN for users
my $name = "ou=students,o=SCHOOL";
my $name2 = "ou=staff,o=SCHOOL";
# Bind uses the users full DN, if uid doesn't work try "cn"
my $binddn = "cn=$userid,$name";
my $binddn2 = "cn=$userid,$name2";
my $db = Net::LDAP->new( $ldapserver );
# do bind
my $res =$db->bind(
dn =>$binddn,
password =>$password);
# do bind
my $res =$db->bind(
dn =>$binddn2,
password =>$password);
# check result, any other result than LDAP_SUCCESS (0)
# is a problem
if($res->code != 0 ) {
# auth refused
warn "Auth failed. LDAP server not responding or invalid
credentials provided";
- [Koha-win32] Re: [Koha] LDAP authentication -- Joy!.....,
Scott Owen <=