Page 36 - RHEL8 BOOK
P. 36

GROUP ADMINISTRATION

          According UPG (user private group) scheme, the user account automatically created own group with the
          same name. A part from the UPG scheme we can create the groups.

          Group:
          A collection of users called group. The group can be running with GID value. This group information
          available at “/etc/group” database file.
          In the group administration 2 types groups are available

          1.     PRIMARY GROUP
          2.     SECONDARY GROUP

          1.     PRIMARY GROUP
          Which user initially belongs to the particular group, the group is the primary group to the user (primary
          user). This user can access or share the information according group permissions.

          2.     SECONDARY GROUP
          A part from the primary group, the user has account in another group, the group called Secondary Group.

                 Note: - The user has only one primary group remaining all groups are the secondary groups.

                 In Group Administration effectively use the 4 Commands are
          1.     groupadd
          2.     groupmod
          3.     gpasswd
          4.     groupdel

          groupadd: - To create a new group
          1.     Adding a new group
                 [root@sun ~] # groupadd <group name>
                 [root@sun ~] # groupadd g1

          2.     Adding a new group with gid 5000
                 [root@sun ~]# groupadd <options> <group name>
                 [root@sun ~]# groupadd -g 5000 g2

          3.     To see the existence group detail
                 [root@sun ~]# grep g2 /etc/group

          groupmod- we can modify the values of existence groups.

          4.     modify the group with gid value
                 [root@sun ~]# groupmod -g 6000 g2
                 [root@sun ~]# grep g2 /etc/group

          5.     Change the name of a existing group
                 [root@sun ~]# groupmod -n <new name> <old name>
                 [root@sun ~]# groupmod -n g3 g2
                 [root@sun ~]# grep g3 /etc/group


                                                       S. Pradhan
                             (MCA, MBA-IT, BCA, CCNA, MCSA 2012, RHCE, ETHICAL HACKING)
                                             Email Id:-spradhan.iiht@gmail.com
                                                           36
   31   32   33   34   35   36   37   38   39   40   41