HDFS - User Group

About

User group

Management

List

  • List group of a user. <note tip>The same than id -Gn userName on the local file system</note>
hdfs groups userName
  • List group of all users. <note tip>The fs.default.name property is only mandatory when using azure wasb</note>
hdfs dfs -ls /user | tail -n +2 | awk '{print $8}' | while read -r userName; do
    hdfs groups  -D "fs.default.name=hdfs://namenode/" ${userName#/user/}
done

where:

  • tail -n +2 suppress the first line
  • awk '{print $8}' print only the directory part

Output:

admin : admin users
admininformatica :
ambari-qa : hadoop users
ams : hadoop
hbase : hadoop
hcat : hadoop
hive : hadoop
livy : hadoop
oozie : hadoop users
root : root
spark : hadoop
sshuser : sshuser adm dialout cdrom floppy sudo audio dip video plugdev netdev lxd
zeppelin : zeppelin

Admin

See HDFS - Permissions (Authorization)

The default administrator group is hdfs.

hdfs getconf -confKey dfs.permissions.superusergroup
hdfs

Powered by ComboStrap