Basic Syntax of gpasswd Command
The basic syntax of the gpasswd
command is straightforward:
gpasswd [option] [group]
Here,
[
options
]
represent various command-line flags that modify the behavior of the gpasswd
command.
[
group
]
specifies the name of the group to be modified.
gpasswd Command in Linux with examples
gpasswd command is used to administer the /etc/group and /etc/gshadow. As every group in Linux has administrators, members, and a password. It is an inherent security problem as more than one person is permitted to know the password. However, groups can perform co-operation between different users. This command assigns a user to a group with some security criteria. This command is called by a group administrator with a group name only which prompts for the new password of the group. System administrators can use the -A option to define group administrator(s) and -M option to define members. They have all the rights of the group administrators and members.