groupdel, groupmod, groupadd, and grpck
Group management is an important aspect of Linux system administration. Groups are used to organize users and define their access privileges to files and directories on the system. The four main commands used for group management are groupadd
, groupmod
, grpck
, and groupdel
.
groupadd
is used to create a new group on the system. To use this command, type groupadd
followed by the desired options and the new group name. For example, to create a new group called DevSec-group
, the command would be groupadd DevSec-group
:
Figure 2.18 – Adding a new group
This command will create a new group with the default settings, including a new GID.
Now that we’ve created our groups, let’s do some modifications such as changing its membership using the groupmod
command. This is a command used to modify an existing group on the system. This command can be used to change the group’s name, GID, or membership...