Support Questions
Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

how to run hdfs admin commands(ex. fsck, -report(output to be fully needed)) with normal local linux user


dfs permissions.JPG

I have created linux user in all machines with the user name same called "balu, 2305" and this is local linux account and no ldap, no AD

[root@cn1 ~]# id balu

uid=2305(balu) gid=2305(balu) groups=2305(balu),2003(hadoop)

[root@cn1 ~]#

above the user and groups info and i added group named "balu" in dfs permissions parameter as attached.

now my requirement is i need to execute all my hdfs admin commands from this user account(balu).

can you help me what i should do to meet this.



@Balaji Vemula

After changing dfs.permissions.superusergroup in hdfs-site.xml, it would require a NameNode restart for the change to take effect. If this cluster uses NameNode HA with QuorumJournalManager, then both NameNodes need to be restarted.

Run "hdfs groups <username>", where <username> is the user that you have added to the group that you want to be the HDFS supergroup. This command will print out a list of that user's group memberships, as perceived by the NameNode. If the list does not show your configured supergroup, then this indicates there is some kind of misconfiguration

From the root CLI switch user to user balu

# su - balu

Now at the prompt you should be able to run hdfs command as user balu

$ hdfs dfsadmin -printTopology 

That should work even on your cloudera