Linux user, groups and permissions
Show all groups
cat /etc/group
#List group names
cut -d: -f1 /etc/group
List users in a specified group
getent group www-data
www-data:x:1002:user1,user2,user3
#Get a nice comma separated list of users
grep ^www-data: /etc/group | cut -d: -f4
user1,user2,user3
Create a group
sudo groupadd admins
Add user to group