1
Jyotirmaya
Ldap authentication Against AD

I hope you can help me out in trying to get XOOPS to authenticate to a W2K3 Active Directory.
So far I am only getting these PHP errors

Notice [PHP]: Undefined variable: userDN in file class/auth/auth_ldap.php line 105 or
or
Warning [PHP]: ldap_bind() [function.ldap-bind]: Unable to bind to server: Invalid credentials in file class/auth/auth_ldap.php line 91

Basically I am trying to authenticate to my AD where dn's look like this:-

DN: CN=common name,OU=London Site Users,DC=domain,DC=org

Problem 1) CN's have a space in them and XOOPS does not allow login names with spaces

Problem 2) We have users in several different OU's which appear at the top level of the domain. This means I cannot specify my base DN as OU=London Site users, DC=Domain,DC=org, since this will exclude other OU's. I also do not want users to have to login with their CN as well as their OU (tedious!)

I use other PHP (PHPldapadmin) tools on my webserver to bind
to and search the AD using LDAP. I would always have to use a username something like common.name@domain.org in order to
bind successfully, this was along with a base DN of
DC=domain,DC=org.

Please can you help me to sort out the authentication if it is at all possible.
"You are never alone or helpless, the force that guides the stars guides you too"

2
Jyotirmaya
Re: Ldap authentication Against AD

reply from Pierre-Eric, module author:
Quote:

For the moment I'm not satisfy by this hack and I plann to make upgrade.

For your AD authentication, you need to select uid as DN to NO.Your XOOPS uid need to be exist in the LDAP Directory in the Users entry.
- uid as DN to NO
- Base DN : DC=domain,DC=org
- UID Field Name : Name of the attribute use to make authentication.
This attribute need to be the same as the XOOPS username (XOOPS login name)

- UID as DN : NO
- DN of the LDAP manager : cn=admin,DC=domain,DC=org
- Password of the LDAP manager : <your pass>

For the moment it's the solution that might works. In the future I plann to make a specific AD auth driver.
"You are never alone or helpless, the force that guides the stars guides you too"

3
Jyotirmaya
Re: Ldap authentication Against AD

Thanks for the info, I managed to get the authentication
working by doing the following:
1) DN of the LDAP manager : admin@domain.org (instead
of cn=,DN=,DN=) - not sure why, but this was consistent with the way my other web applications authenticate against my AD.
2) I had to set the password of the XOOPS user as exactly
the same as the password on the LDAP server.

Some questions:
When I change my password in my Active directory (users must change this every 2 months for security), the password in XOOPS is not automatically changed and I can then no longer log in to xoops. Is the password now being checked in both XOOPS and LDAP? If so, how can I keep the passwords synchronised.

Are the passwords sent between XOOPS and LDAP in encrypted form or clear text?
"You are never alone or helpless, the force that guides the stars guides you too"

4
pemen
Re: Ldap authentication Against AD
  • 2005/9/7 13:05

  • pemen

  • Not too shy to talk

  • Posts: 186

  • Since: 2002/7/8 7


For the moment, the XOOPS Auth LDAP checks the password in both LDAP server and XOOPS Database (it's a problem).
The next version will check the password only in the LDAP server(for LDAP Auth option).

Nvertheless, I suggest you to keep Active Directory and XOOPS password synchronised for better maintenance.
Identity management, LDAP, Workflow and more
XoopsPro

5
pemen
Re: Ldap authentication Against AD
  • 2005/9/7 15:54

  • pemen

  • Not too shy to talk

  • Posts: 186

  • Since: 2002/7/8 7


Quote:
1) DN of the LDAP manager : admin@domain.org (instead of cn=,DN=,DN=) - not sure why, but this was consistent with the way my other web applications authenticate against my AD.


Effectly, in windows server 2003 you can use the UPN (Userprincipal name) to login to AD. The UPN is like an email adress like user@domain.org.

But the normal DN : cn=<firstName>+<LastName>,dc=domain,dc=suffix is also available.

For auth with XOOPS, you need to set "uid as dn" to NO and
LDAP - UID Field Name (in fact login field name) to
the attribute that correspond to XOOPS uid field.
Identity management, LDAP, Workflow and more
XoopsPro

6
Jyotirmaya
Re: Ldap authentication Against AD

With the current set up for LDAP authentication, I see the major use as only allowing those people to register whose accounts are allready on your LDAP server.

I think if we can get authentication to check just password in LDAP this will add a lot more flexibility. Also, for setups like mine where I run several XOOPS portals for my organisation, it would help to keep all the passwords in one secure place.
"You are never alone or helpless, the force that guides the stars guides you too"

7
pemen
Re: Ldap authentication Against AD
  • 2005/9/8 10:07

  • pemen

  • Not too shy to talk

  • Posts: 186

  • Since: 2002/7/8 7


Hi,

Totally agree. This is the goal of the next version of the LDAP Auth.
Identity management, LDAP, Workflow and more
XoopsPro

Login

Who's Online

162 user(s) are online (115 user(s) are browsing Support Forums)


Members: 0


Guests: 162


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits