依赖条件:
1、保证ranger 服务正常
2、openldap或者AD服务正常
1、配置usersync和AD集成
在cm页面点击Ranger ——》配置——》左边选择Ranger Usersync 配置以下参数
name | values |
---|---|
ranger.usersync.source.impl.class | org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder |
ranger.usersync.ldap.url | ldap地址(例如:ldap://192.168.160.178) |
ranger.usersync.ldap.binddn | ad绑定用户 |
ranger.usersync.ldap.ldapbindpassword | ad绑定用户密码 |
ranger.usersync.ldap.searchBase | ad的域,基于那个域进行搜索 |
ranger.usersync.ldap.user.searchbase | 用户所在的ou(例如:CN=Users,DC=fayson,DC=com,如需同步多个ou的用户,使用;进行分割,如CN=Users,DC=fayson,DC=com;ou=ddd_test,DC=fayson,DC=com) |
ranger.usersync.ldap.user.objectclass | user 或者 person |
ranger.usersync.ldap.user.nameattribute | sAMAccountName |
ranger.usersync.ldap.user.groupnameattribute | sAMAccountName |
ranger.usersync.group.searchbase | DC=fayson,DC=com(如需同步多个ou的用户,使用;进行分割,如CN=Users,DC=fayson,DC=com;ou=ddd_test,DC=fayson,DC=com) |
ranger.usersync.group.nameattribute | cn |
ranger.usersync.group.objectclass | group |
ranger.usersync.group.memberattributename | member |
ranger.usersync.user.searchenabled | true |
ranger.usersync.group.search.first.enabled | true |
重启usersync
登录ranger admin 页面查看用户同步是否成功
需要注意的是,同步的用户的组必须在同步的ou中,不然会无法同步。同步的用户取的是以下的交集。