如何在Linux的hdfs的超组中添加用户? [英] how to add user in supergroup of hdfs in linux?

查看:279
本文介绍了如何在Linux的hdfs的超组中添加用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当时在hdfs上工作,然后发现某些内容未对超级用户执行权限检查. 如果我的Linux用户是sandy,而我想将sandy添加到超级用户组. 因此,不会发生被拒绝的权限,在hdfs配置中这样做是否可行. 如果将用户分配给超级组没有问题,那么该怎么做?

I was working on hdfs then i found something that permissions checks are not performed for the super-user. If my linux user is sandy and i want add sandy to group of super-user. So permissions denied will not occur, is it feasible to do that in hdfs configuration. And if there is no problem in assigning the user to supergroup then how to do it ?

推荐答案

是的,现在我已经知道如何在任何hdfs群集上创建用户和组. 首先,我没有在 /etc/group 中找到任何名为 supergroup 的组.

Yes , now i have whole idea how users and group should be created on any hdfs cluster. First of all i didn't find any group named supergroup in /etc/group.

因此,好的做法是创建自己的超组.

So good practice is to create your own supergroup.

  1. sudo addgroup测试组
  2. 然后根据需要创建任意数量的用户.例如 adduser sandy
  3. 然后将这些用户添加到测试组
  4. 然后编辑hdfs-site.xml属性并添加此属性 dfs.permissions.superusergroup ,值将是您的组名
  5. 现在您可以在hdfs中创建任意数量的文件夹,然后将所有权分配为 yourusername:supergroup,例如 sandy:testgroup
  1. sudo addgroup testgroup
  2. Then create users as many you want. e.g adduser sandy
  3. Then add these users to testgroup
  4. Then edit hdfs-site.xml property and add this property dfs.permissions.superusergroup, value will be your group name
  5. Now you can create any number of folders in hdfs and then assign ownership as yourusername:supergroup e.g sandy:testgroup

这篇关于如何在Linux的hdfs的超组中添加用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆