HDFS - User Group

1 - About

User group

3 - Management

3.1 - List

  • List group of a user. The same than id -Gn userName on the local file system
hdfs groups userName
  • List group of all users. The fs.default.name property is only mandatory when using azure wasb
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

3.2 - Admin

See admin

The default administrator group is hdfs.

hdfs getconf -confKey dfs.permissions.superusergroup
hdfs
db/hadoop/hdfs/group.txt ยท Last modified: 2018/05/15 16:33 by gerardnico