The group in Linux is very similar to the group in Windows. You can create a group and add a member to the list of this group. Resources can be allocated in groups. Members belonging to the same group can access the same resource.
Using the console command groupAdd creation group is simple:
GroupAdd MyGroup
This will create a group called "newgroup" without any member. The group is stored in the / etc / group file. Each group is listed separately, as shown below:
MyGroup: x: 527:
The first column is the name of the group. The second column is a password. Similarly, "X" means that the true password is stored in the / etc / gshadow image file. The third column is a group's digital index. After the third column, it will be a user ID of a member of a group spaced apart.
You can add a member to the group using the gpasswd command. To use the -A switch, follow the username you want to add:
gpasswd -a userid mygroup
Deleting a member of the group or using this command, but the switch used is -d instead of -A:
gpasswd -d userid mygroup
Groups can also be modified by directly editing / etc / group files.