Group:
Group is a collection of user to whom the same permissions are to be applied.
There are two types of groups
Primary
Secondary.
Red Hat Linux uses a User Private Group (UPG) Scheme.
When a user is created a group with the same name as the username is also created. This becomes the primary group for that user. A user can have only one primary group.
Content of /etc/group
- The information of each group created is stored in a separate line in the file /etc/group.
- Each record has four fields separated by : as given:-
Content of /etc/gshadow
- This file contains the encrypted group password.
- Passwords are encrypted using MD5 (Message Digest Version 5) Algorithm
Creating a Group:
[root@webnoidschools ~]# groupadd <group name>
[root@comp1 ~]# groupadd <options> <arguments> <grpname>
Options
-g GID
-o Override
Modifying a Group
root@comp1 ~]# groupmod <option> <arguments> <grpname>
Options
-g GID
-o Override
-n Group name
Deleting a Group:
[root@comp1 ~]# groupdel <group name>
Note: A group cannot be deleted if it has primary members.
Group Membership:
[root@comp1 ~]# gpasswd <option> <arguments> <grpname>
Options:
-M Add multiple users to the group
-A Adds a group administrator
-a Add a user to the group
-d Delete a user from the group
Managing Groups Using (GUI)
[root@comp1 ~]# system-config-users &