LDAP 安装部署(六)

6.1 使用LDAP实现统一用户管理

在实现单点登录之前,必须完成对统一用户管理的配置,笔者这里使用的是Knox安装时自带的LDAP Demo进行统一用户管理,如果你有已经建好的LADP服务,也可以直接使用。默认情况下,Ambari使用内部数据库作为用户存储进行身份验证和授权。

使用LDAP配置Ambari身份验证
Ldap (在安装ambari的机器上操作,hdp04)

1、运行命令根据提示输入相关信息

[root@hdp04 ~]# ambari-server setup-ldap
Using python  /usr/bin/python
Setting up LDAP properties...
Primary URL* {host:port} (10.12.167.5:33389):
Secondary URL {host:port} :
Use SSL* [true/false] (false):
User object class* (person):
User name attribute* (uid):
Group object class* (organizationalUnit): groupofnames
Group name attribute* (cn):
Group member attribute* (member):
Distinguished name attribute* (dn):
Base DN* (dc=hadoop,dc=apache,dc=org):
Referral method [follow/ignore] (ignore):
Bind anonymously* [true/false] (false):
Manager DN* (uid=root,ou=people,dc=hadoop,dc=apache,dc=org):
Enter Manager Password* : root

2、给这个文件添加如下属性:

/etc/ambari-server/conf/ambari-properties
      authentication.ldap.pagination.enabled=false  

需要这一步操作的原因见下图:

这里写图片描述

3、重启 ambari-server

   ambari-server restart 

4、同步User and groups

     ambari-server sync-ldap --all

6.2 往LDAP中添加用户并同步的步骤

通过Knox往LDAP中添加用户并同步的步骤:

1、通过Ambari 在Knox中添加对应的用户(后续可通过Ldap java api 进行添加)
其api添加链接如下:
http://blog.csdn.net/u013850277/article/details/76651167

这里写图片描述

2、添加完后重启LDAP
这里写图片描述

3、在通过ambari后台服务进行同步,命令:

 ambari-server sync-ldap --all 

运行完如上命令则Ldap的用户便添加到Ambari中了。

参考文档:
https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.3/bk_security/content/_setting_up_ldap_user_authentication.html

https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.3/bk_security/content/_configure_ambari_to_use_ldap_server.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值