Group Management

Coming from Linux and MacOS groups will be a new concept for you. Groups provide the ability to have a collection of users (a group) granted specific permissions to a resource(s) (block device, files, directories, etc.) that is then shared among each group member. Due to the ability of groups it important to understand how to add and delete groups within Linux, so that you have the ability to control what groups can access.

We will also learn how to change group information, such as adding a password to a group or adding users to group. Again, groups in Linux are a collection of users and these users can be given privileges like read, write or execute on a given resource that is shared among the users within the group.

groupadd

The groupadd command does as you would expect. It creates a new group using values that are specified on the command line.

https://linux.die.net/man/8/groupadd

newgrp

The newgrp command can be a bit confusing as it almost seems as if the command will create a new group. This is not the case though. The newgrp command will change your current group.

https://linux.die.net/man/1/newgrp

https://www.computerhope.com/unix/unewgrp.htm

groupdel

The groupdel command deletes/removes a group from the Linux system.

https://linux.die.net/man/8/groupdel

groupmod & gpasswd

These commands are not frequently used. Passwords with groups are possible, but as it is a shared password among all group members it does not have a strong grasp of security. Also, if you are a member of the group you won't have to specify the password, the only time the password is really used is if you are not a member and you wish to change to that group using the newgrp command. These commands are just being provided for your information as they do relate to groups in Linux, but you will probably never use these commands.

https://linux.die.net/man/8/groupmod

https://linux.die.net/man/1/gpasswd