Tuesday 19 August 2008 4:06:37 am
Hi I have just configured ez to authenticate against a LDAP Active Directory Server. The authentication look to work fine, but I have two problems:
- If the user has not a mail attribute, login fails. - If I set "LDAPGroupMappingType=GetGroupsTree", LDAP groups the user belongs to are created automatically in ez, but the user can not access any area on the site, because he has not any role assigned. If I set "LDAPGroupMappingType=GetGroupsTree" or "LDAPGroupMappingType=UseGroupAttribute" the user is included in "Guest Accounts" group, but the groups he belongs to in the LDAP directory are not created. Is there any way to automatically create the groups the user belongs to, and also add him to some specific ez groups for default roles and permissions? Could you help me? Thanks in advance. Below is my ldap.ini file. =====================================================
#?ini charset="iso-8859-1"?
# eZ Publish configuration file for connection and authentication of users via LDAP #
[LDAPSettings]
# Set LDAP version number LDAPVersion=3
# Set to true if use LDAP server LDAPEnabled=true
# LDAP host LDAPServer=192.168.1.159
# Port nr for LDAP, default is 389 LDAPPort=389
# Specifies the base DN for the directory. LDAPBaseDn=ou--Cuentas,dc--leo2008,dc--local
# If the server does not allow anonymous bind, specify the user name for the bind here. LDAPBindUser=LEO2008\Administrador
# If the server does not allow anonymous bind, specify the password for the bind here. LDAPBindPassword=a1b2c3D4
# Could be sub, one, base. LDAPSearchScope=sub
# Use the equla sign to replace "=" when specify LDAPBaseDn or LDAPSearchFilters LDAPEqualSign=--
# Add extra search requirment. Uncomment it if you don't need it.
# Example LDAPSearchFilters[]=objectClass--inetOrgPerson LDAPSearchFilters[]=objectClass--person
# LDAP attribute for login. Normally, uid LDAPLoginAttribute=samaccountname
# Could be id or name LDAPUserGroupType=id
# Default place to store LDAP users. Could be content object id or group name for LDAP user group,
# depends on LDAPUserGroupType. LDAPUserGroup[]=11
# Group mapping settings:
# Possible values: UseGroupAttribute (old style group assignig using LDAPUserGroupAttribute setting),
# SimpleMapping (using LDAPUserGroupMap array for name-to-name group mapping) or GetGroupsTree LDAPGroupMappingType=GetGroupsTree
# Base LDAP dn which should be used to fetch user group objects from LDAP LDAPGroupBaseDN=ou=Cuentas,dc=leo2008,dc=local
# LDAP user group class LDAPGroupClass=group
# Attribute which should be used to obtain name of an LDAP group
# Required then 'LDAPGroupMappingType' is set to 'GetGroupsTree' or 'SimpleMapping' LDAPGroupNameAttribute=cn
# Attribute of LDAP user which should be used to obtain groups which user(group) belongs to.
# Required then 'LDAPGroupMappingType' is set to 'GetGroupsTree' or 'SimpleMapping' LDAPGroupMemberAttribute=member
# Attribute which contain description of LDAP group, optional LDAPGroupDescriptionAttribute=description
# Group names map (from LDAP to ezpublish user-groups),
# used then 'LDAPGroupMappingType' is set to 'SimpleMapping' LDAPUserGroupMap[]
# LDAP attribute type for user group. Could be name or id LDAPUserGroupAttributeType=name
# LDAP attribute for user group. For example, employeetype. If specified, LDAP users
# will be saved under the same group as in LDAP server. LDAPUserGroupAttribute=
# LDAP attribute for First name. Normally, givenname LDAPFirstNameAttribute=givenname
# LDAP attribute for Last name. Normally, sn LDAPLastNameAttribute=sn
# LDAP attribute for email. Normally, mail LDAPEmailAttribute=mail
# LDAP encoding is utf-8 or not Utf8Encoding=false
# if 'enabled' you can move LDAP users to a different group and they will not
# be automatically moved back (to the group they are configured to be placed in)
# when the user logs in again. KeepGroupAssignment=disabled
|