WeBWorK Main Forum

LDAP credentials

LDAP credentials

by Andras Balogh -
Number of replies: 2

Our university disabled anonymous LDAP authentication.
As a consequence, we have to use now a special username and password
to connect to the LDAP server for authentication.

Is there a way to enter these credentials in global.conf or somewhere else?

Andras

In reply to Andras Balogh

Re: LDAP credentials

by Andras Balogh -
So far I found LDAP.pm in the directory
lib/WeBWorK/Authen, and it shows the line

# bind anonymously

I would really appreciate if someone could help me rewriting it to include additional credentials for authentication.

Andras
In reply to Andras Balogh

Re: LDAP credentials

by Andras Balogh -
Answering the solution to my own problem:

I received from our generous tech support
a special username and password for an account with special search privilage on the LDAP server.
Let me denote them by spec_uname and spec_passwd.

In the file LDAP.pm the following two lines

# bind anonymously
$msg = $ldap->bind;

were changed to

# bind using credentials
$msg = $ldap->bind("cn=spec_uname, cn=... ,dc=...,dc=...", password => "spec_passwd");

Substitute ... with your site specific base info.

I am sure that all this information could be pulled from the global.conf file, but this works for me for now (until I upgrade webwork and forget how to fix it again).

I think the password can also be encrypted.

Andras