Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to find the name of supergroup in hadoop and list all the members of the group?

Solved Go to solution

How to find the name of supergroup in hadoop and list all the members of the group?

Explorer

Hi there,

How to find the name of supergroup in hadoop and list all the members of the group?

I know hdfs is the super user in hadoop, but SuperGroup name

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to find the name of supergroup in hadoop and list all the members of the group?

@Jeeva Jeeva - There is a property "dfs.permissions.superusergroup" in hdfs-site.xml which specifies the superusergroup.

Please see below apache guide for HDFS Permissions:

https://hadoop.apache.org/docs/r2.4.1/hadoop-project-dist/hadoop-hdfs/HdfsPermissionsGuide.html

To list all the users belonging to the supergroup, its just like getting users belonging to a group in linux. Below is good article on that:

https://www.cyberciti.biz/faq/linux-list-all-members-of-a-group/

15 REPLIES 15

Re: How to find the name of supergroup in hadoop and list all the members of the group?

Master Collaborator

Is dfs.permissions.superusergroup in hdfs-site.xml what you are looking for?

Re: How to find the name of supergroup in hadoop and list all the members of the group?

Explorer

yes. But, how to list all the users in the superusergroup?

I found superusergroup : hdfs in hdfs-site.xml. But, how to find the users in the group hdfs.

Re: How to find the name of supergroup in hadoop and list all the members of the group?

@Jeeva Jeeva - There is a property "dfs.permissions.superusergroup" in hdfs-site.xml which specifies the superusergroup.

Please see below apache guide for HDFS Permissions:

https://hadoop.apache.org/docs/r2.4.1/hadoop-project-dist/hadoop-hdfs/HdfsPermissionsGuide.html

To list all the users belonging to the supergroup, its just like getting users belonging to a group in linux. Below is good article on that:

https://www.cyberciti.biz/faq/linux-list-all-members-of-a-group/

Re: How to find the name of supergroup in hadoop and list all the members of the group?

Explorer

Hi Namit Maheshwari,

Thanks for your time to reply. Your answer saved my life and one more question

How to see the members of the superusergroup for a namenode?

In my case, the super user is "hdfs".

I have been asked to find all the members of the superuser group.

/etc/group file is not for the namenode. So, there should be some other way.

Re: How to find the name of supergroup in hadoop and list all the members of the group?

Hi Jeeva,

Find the superusergroup value in hdfs-site.xml. Lets say for instance this value is 'hadoop'

Once you find that value, you need to do is "grep 'superusergroup:' /etc/group"

i.e if that value is hadoop, it will be:

grep 'hadoop:' /etc/group

This should return you the list of all users belonging to the supergroup.

Re: How to find the name of supergroup in hadoop and list all the members of the group?

Explorer

Hi Maheshwari,

Our superusergroup is hdfs

That's what i did. He asked me where i got these members from and i told from /etc/group file. But, Technical Lead said something different. Here is the conversation we had below.

Jeeva:I got it from /etc/group file

Fred: that is correct for this particular server

how about what namenode?

that's where 'hdfs groups' tell you

Re: How to find the name of supergroup in hadoop and list all the members of the group?

I think what he means is to check the same on the namenode hosts.

Re: How to find the name of supergroup in hadoop and list all the members of the group?

Explorer

Could you suggest me how to check on the namenode?

Re: How to find the name of supergroup in hadoop and list all the members of the group?

You just need to logon to the namenode hosts and run the same grep command on the /etc/group file

Don't have an account?
Coming from Hortonworks? Activate your account here