UserGroupInformation如何配置从ldap中获取用户
时间: 2024-04-16 14:26:33 浏览: 15
要从LDAP中获取用户信息,您需要配置Hadoop的安全认证机制以使用LDAP作为用户和用户组的数据源。以下是一个示例配置文件`core-site.xml`的片段,展示如何配置Hadoop使用LDAP:
```xml
<configuration>
<property>
<name>hadoop.security.authentication</name>
<value>kerberos</value>
</property>
<property>
<name>hadoop.security.authorization</name>
<value>true</value>
</property>
<property>
<name>hadoop.security.group.mapping.ldap.url</name>
<value>ldap://ldap-server:389</value>
</property>
<property>
<name>hadoop.security.group.mapping.ldap.base</name>
<value>ou=groups,dc=example,dc=com</value>
</property>
<property>
<name>hadoop.security.group.mapping.ldap.search.filter.user</name>
<value>(uid={0})</value>
</property>
<property>
<name>hadoop.security.group.mapping.ldap.search.filter.group</name>
***