## Installation

### LDAP search

by Andras Balogh -
Number of replies: 7
I have a fresh installation of webwork,
and I noticed that in
/opt/webwork/webwork2/lib/WeBWorK/Authen/LDAP.pm
the line
$msg =$ldap->search(base => $base, filter => "uid=$uid");
was changed to
$msg =$ldap->search(base => $base, filter => "sAMAccountName=$uid");

Apparently for our LDAP server sAMAccountName has to be replaced with the (old) uid.

Andras

### Re: LDAP search

by Michael Gage -
Andras,

thanks for the report.

This change first appears in revision 6143 when Mark Hamrick

updated LDAP so that

"Updated LDAP.pm to work with LDAPS servers that require the usage of a binder account."

to have worked for many. Mark may
be able to tell us whether or not this change was intentional.

-- Mike

### Re: LDAP search

by Danny Glin -
The full discussion of this can be found in bug 1927 (http://bugs.webwork.maa.org/show_bug.cgi?id=1927). Not sure if this has been committed yet, though.

The short version is that standard LDAP servers and Active Directory servers need slightly different configurations, so the LDAP configuration for both has been (or will be) moved to global.conf.

Danny

### Re: LDAP search

by Bill Farr -
We just upgraded our server and ran into this bug. We use a standard
LDAP server. Installing the patch supplied by Kevin Carstensen seems
to be working fine for us. So thanks very much for the fix.

Any idea when the patch will be incorporated into the trunk?

Bill

### Re: LDAP search

by Michael Gage -
I've added the patch to trunk. (Thanks for the heads up -- guess it just fell through the cracks). Let us know if there are issues.

Take care,

mike

### Re: LDAP search

by Bill Farr -
I updated this morning on my test server, and I'm not sure the
patch to LDAP.pm came through. It looks fine on the repository, but
I got the following output from my svn update command in the webwork2 directory.

[d503:/opt/webwork/webwork2] root# svn update
U    conf/global.conf.dist
U    lib/WeBWorK/ContentGenerator/ProblemSet.pm
A    lib/WeBWorK/ContentGenerator/problemUtil
svn: URL 'http://svn.webwork.maa.org/system/trunk/webwork2/lib/WeBWorK/ContentGenerator/problemUtil' of existing directory 'lib/WeBWorK/ContentGenerator/ProblemUtil' does not match expected URL   'http://svn.webwork.maa.org/system/trunk/webwork2/lib/WeBWorK/ContentGenerator/ProblemUtil'

The output stopped there, so I think the rest of the update was aborted.

Looking on the repository I see two subdirectories 'problemUtil' and
'ProblemUtil' in /trunk/webwork2/lib/WeBWorK/ContentGenerator. Both
were created at the same time. Perhaps one is extra?

Regards,
Bill

### Re: LDAP search

by Michael Gage -
I've been having trouble with this -- (an original upload used the wrong capitalization)

I think I finally have this solved. The Mac ignores capitalization -- that's where I do the majority of my coding -- and I believe that was preventing me from properly deleting the problemUtil directory

I have now done an svn remove, commit and update from a unix machine and I believe that the problem is solved. In any case try again and see if the LDAP patch comes through this time.

there should also be a patch to global.conf.dist which you will need to copy to global.conf and uncomment before you will get the additional configuration flexibility you need.

-- let us know how it goes.

-- Mike

### Re: LDAP search

by Bill Farr -
Thanks, Mike. The update worked fine this time. I knew about the
change to global.conf.dist. That came through as well.

I had installed the patches manually on our production server and they
are working fine.

As a fellow Mac user, I sympathize with you. Ignoring capitalization is
annoying.

Bill