group in Linux

What is group?

group have a name and a number. Local groups are defined in /etc/group.

Create new group account

groupadd groupname command is used to create new group account.

Create Group using specific GID
Use –g GID option is used to specify a specific GID.
            # groupadd –g 5000 hatim
            Here GID 5000 is set to group user hatim

Delete Group

groupdel command will remove a group.
            # groupdel redhat will remove redhat group.

Add user to supplementary group

usermod command is used to modify the user ownership.
            # usermod –G groupname username
            Ex. usermod –G hatim redhat
            Here user redhat is become user of group hatim.

Most Reading