To set up OpenLDAP authentication:
- Get the mojoPortal content management site working using database authentication, i.e. "normal" installation.
- Log in as an admin user, go to the Member List page, and click Manage (or the gear icon) by an admin user.
- Change the admin user's ID to one that matches an OpenLDAP user. For example, if my OpenLDAP user is jaudette, I would change the mojoPortal user ID from admin to jaudette.
- Log out, then log in again using the new user ID.
- Select Administration, Site Settings.
- Click the Security tab, then the LDAP Settings tab.
- Enter the LDAP server hostname and port. For authentication over SSL, see below for a needed additional key.
- Enter the root Distinguished Name (DN) for user authentication (e.g. CN=admin,DC=example,DC=org).
- Check the "Automatically add LDAP users on first login" box, if you would like your users to be automatically created in mojoPortal following a successful LDAP authentication. Users will be created with a strong, unguessable random password. With OpenLDAP authentication, mojoPortal will also attempt to use "givenName" and "sn" for the first name and last name in the display name field, respectively. If it is unable to select those keys, or you are using Active Directory, the user is created with login ID ("CN") as the display name.
Click Save to store the basic settings. Then check the box that says Use LDAP for Authentication and enter your OpenLDAP user's password in the password box.
Click Save again, and this time it will test the authentication against OpenLDAP. If it fails it will not save the setting Use LDAP for Authentication. This is to prevent you from getting locked out of the site.
Note: As of mojoPortal version 184.108.40.206, if you wish to use SSL for your LDAP connection (port 636, by default), add the following key to your user.config file:
<add key="UseSSLForLDAP" value="true" />
Note: As of mojoPortal version 220.127.116.11, if you wish to use database authentication, with fallback to LDAP authentication, mark the appropriate boxes on the LDAP Settings page for each site. Note also that you must leave "Disable Database Authentication" unchecked.
For versions between 18.104.22.168 and 22.214.171.124, to enable LDAP fallback for all sites within your mojoPortal installation, add the following key to your user.config file:
<add key="UseLDAPFallbackAuthentication" value="true" />
Edited 2012-12-11 Jamie Eubanks