Configure LdapGroupsMapping in ClouderaManager
Currently I have a problem with configuring the LdapGroupsMapping, I cannot get the groups of the users and it generates the following error message with the command:
$hadoop org.apache.hadoop.security.UserGroupInformation
20/03/19 16:44:20 WARN security.LdapGroupsMapping: Failed to get groups for user c12345a
(retry=0) by javax.naming.NamingException: [LDAP: error code 1 - 000004DC: LdapErr: DSID-0C090A4C, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, v3839]; remaining name 'DC=sub,DC=us,DC=domain,DC=local'
$hdfs dfsadmin -refreshUserToGroupsMappings
Refresh user to groups mapping successful
$hdfs groups
c12345a@SUB.US.DOMAIN.LOCAL :
the core-site.xml configuration is as follows
-<property>
<name>hadoop.security.group.mapping</name>
<value>org.apache.hadoop.security.LdapGroupsMapping</value>
</property>
-<property>
<name>hadoop.security.group.mapping.ldap.url</name>
<value>ldap://sub.us.domain.local:389</value>
</property>
-<property>
<name>hadoop.security.group.mapping.ldap.use.ssl</name>
<value>true</value>
</property>
-<property>
<name>hadoop.security.group.mapping.ldap.ssl.keystore</name>
<value>{{CMF_CONF_DIR}}/cm-auto-global_truststore.jks</value>
</property>
-<property>
<name>hadoop.security.group.mapping.ldap.bind.user</name>
<value>ClouderaManager@SUB.US.DOMAIN.LOCAL</value>
</property>
-<property>
<name>hadoop.security.group.mapping.ldap.base</name>
<value>DC=sub,DC=us,DC=domain,DC=local</value>
</property>
-<property>
<name>hadoop.security.group.mapping.ldap.search.filter.user</name>
<value>(&(objectClass=user)(sAMAccountName={0}))</value>
</property>
-<property>
<name>hadoop.security.group.mapping.ldap.search.filter.group</name>
<value>(objectClass=group)</value>
</property>
-<property>
<name>hadoop.security.group.mapping.ldap.search.attr.member</name>
<value>member</value>
</property>
-<property>
<name>hadoop.security.group.mapping.ldap.search.attr.group.name</name>
<value>cn</value>
Thank you for your help

