Groups Management
groupadd
groupadd group_name- create new groupgroup_name
groupdel
groupdel group_name- delete groupgroup_name
groupmod
- modify some group
 groupmod --new-name new_group_name group_name- renamegroup_nametonew_group_name
/etc/group file
- contains the information related to the groups on the system
 - format - 
group_name:password:gid:members 
/etc/gshadow
- contains the information regarding the passwords for the groups
 - format - 
group_name:password:group_administrator:group_members 
gpasswd
- add new member to a group
 gpasswd -A member_name group_name- add member 
member_nameto groupgroup_nameas group administrator -Asignifies group administrator
- add member 
 usermod -aG group_name user_name-aappend-Ggroup- add user 
user_nameto groupgroup_nameas a member 
usermod -a group_name user_name- add 
group_namegroup to the useuser_name 
- add 
 
power of group administrators
Suppose a user is group administrator of group1 then
gpasswd -a user_name group1- adduser_nametogroup1getent group group1- get the details of the groupgroup1gpasswd -d user_name group1- removeuser_namefromgroup1gpasswd group1- set the password for thegroup1
newgrp
- temporarily add a group to your user
 newgrp grpname- you will need group password for this