Tuesday, November 02, 2010

Joomla LDAP Setup

Hi Friends,

Few days back i was playing with an internal setup of WAMP Server having Apache 2.2.11, PHP 5.3.0 & MySQL 5.1.36 deployed with Joomla 1.5.21 CMS.
Joomla provides a native LDAP Authentication plugin which can be enabled to connect to your LDAP directory for authentication. It can be found under your Joomla Admin Panel -> Extensions -> Plugin Manager -> Authentication - LDAP
In our environment we have Red Hat Directory Server providing us the directory services.
It supports bind & search kind of authentication over LDAP, so below are the settings needed to be done on the joomla authentication plugin
Host: ldaphost.domain.com
Port: 389 [Default, change it if you run on other port number]
Authorisation Method: Bind & Search
Base DN: dc=value,dc=value    [e.g. dc=domainname,dc=com]
Search String: uid=[search]     [Note, here uid is the attribute which stores user id. So in your environment you have userid as the attribute, then the correct value is userid=[search] ]
User's DN: [This should be blank & only used if you are using Authorisation Method as bind directly as a user. ]
Connect Username: uid=directoryadminusername,ou=directoryadminusergroup,dc=value,dc=value
uid - Is the attribute which stores user id. If you have userid as the attribute, the it should be userid=
directoryadminusername - This should be your LDAP Directories Admin user's id
directoryadminusergroup - This should be your LDAP Directory Admin user's group name
dc=value,dc=value - This should be similar to your Base DN ]
Connect Passwod: Specify the directory admin user password here
Map Full name: fullnameattribute [Specify the attribute within LDAP Directory which stores the full name]
Map Email: emailattribute [Specify the attribute within LDAP Directory which stores the email address]
Map Userid: useridattribute [Specify the attribute within LDAP Directory which stores the userid]

Note, once you enable the LDAP Authentication, any new user logging in will have an automatic user record creation within Joomla. So in essence, you should take off the "Register" link on the login form!

If you face issues while setting this up, then please ask in the comments section :-)

Joomla 1.5.21, PHP, MySQL, WAMP, Apache, CMS, LDAP, etc

1 comment:

Anonymous said...

you saved my day!

all worked fine - thanks a lot :)

your instructions are the only one i've found for a openldap config.