3 Basic Commands and Simple Shell Scripts Once you have your first Red Hat Enterprise Linux rhel



Download 1.85 Mb.
View original pdf
Page6/67
Date26.02.2024
Size1.85 Mb.
#63678
1   2   3   4   5   6   7   8   9   ...   67
Pablo Iranzo Gómez, Pedro Ibáñez Requena, Miguel Pérez Colino, Scott McCarty - Red Hat Enterprise Linux 9 Administration-Packt Publishing (2022) -chap 3 82 - 180
Groups
Groups
are away of assigning certain permissions to a subset of users in a dynamic way. As an example, let’s imagine a scenario where we have a finance team. We can create the finance group and provide permission to access, read, and write the /srv/finance directory. When the finance team has anew hire, to provide them with access to that folder, we only need to add the user assigned to this person to the finance group (this also works if someone leaves the team – we will only have to remove their account from the finance group).
Groups have a number called the GID that the system uses to identify them internally.
The data for groups is stored in the system in the /etc/group file. To edit this file in away that ensures consistency and avoids corruption, we have to use the vigr tool. The file contains one group per line with different fields separated by a colon (:). Let’s take a look at the line for the wheel group:
wheel:x:10:user
Let’s review what each field means wheel This is the name of the group. In this case, this group is special, as it is configured by default to be used as the one to provide admin privileges to regular users.

Understanding users, groups, and basic permissions x This is the group password field. It’s currently obsolete and should always contain x. It is maintained for compatibility purposes 10: This is the GID value for the group itself user This is the list of the users belonging to that group (separated by commas, such as user, user, and user3).
The types of groups areas follows The primary group: This is the group assigned to the files newly created by the user A private group: This is a specific group with the same name as the user that is created for each user. When adding anew user account, a private group will be automatically created for it. Commonly, the primary group and private group are the same A supplementary group: This is another group usually created for specific purposes. Byway of an example, we can seethe wheel group for enabling admin privileges to users or the cdrom group for providing access to CDs and DVDs devices in the system.

Download 1.85 Mb.

Share with your friends:
1   2   3   4   5   6   7   8   9   ...   67




The database is protected by copyright ©ininet.org 2024
send message

    Main page