[Koha] Re: LDAP (it just a wild guess)

the undead the_real_undead at hotmail.com
Tue Aug 22 23:22:36 NZST 2006

first of all if koha reads from ldap so skip the next step

if not

find the lines below

#       my $binddn = "cn=$userid,$name";
        my $binddn = "uid=$userid,$name";

        my $db = Net::LDAP->new( $ldapserver );

        # do bind
        my $res =$db->bind(
                        password =>$password);

you have two things to try:

the fist one is to figure out if the "userid" is true in your organization 
database, if it's not "userid" it could be "id" or any thing else, change 
the string "userid" to the wright one.

if it's true and nothing happened so move the # from the fist line and add 
it to the second line

and see what will happen

if nothing happened I think that you will have to write the password after 
"password =>$"

and see what will happen

if there is now a connection but it didn't work
now we shall change the configuration of date base to match your own

the next lines are the lines you should edit to make koha know which field 
it sould get the data from

the koha definations are the one next to the $borrower, leve it unchanged 
and change the strings after the = &$ to match the database in your own 
organization and see what will happen

                my %borrower;
                $borrower{cardnumber} = $userid;
                $borrower{firstname} = $memberhash{gecos}; # MANDATORY FIELD
                $borrower{surname} = $memberhash{gecos}; # MANDATORY FIELD
                $borrower{initials} =
substr($borrower{firstname},0,1).substr($borrower{surname},0,1)."  ";
                $borrower{streetaddress} = $memberhash{street}." "; 
                $borrower{city} = $memberhash{l}." "; # MANDATORY FIELD
                $borrower{phone} = $memberhash{homephone}." "; # MANDATORY 
                $borrower{branchcode} = $memberhash{department}; # MANDATORY 
                $borrower{emailaddress} = $memberhash{mail};
                $borrower{categorycode} = $memberhash{designation};

Search from any web page with powerful protection. Get the FREE Windows Live 
Toolbar Today!   http://get.live.com/toolbar/overview

More information about the Koha mailing list