From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 2 File Access, Storage, and Security

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Create, delete, and modify local groups and group memberships

Create, delete, and modify local groups and group memberships

From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 2 File Access, Storage, and Security

Start my 1-month free trial

Create, delete, and modify local groups and group memberships

- [Instructor] Groups are an important part of the Linux user management system. Each user belongs to a primary group. When users create files, they're owned by the user's primary group. Users can also belong to additional supplemental groups. This gives users the ability to access resources owned by those additional groups. We create a group using group add. Group add has a few options, but the most common is -g for specifying the group ID. Let's create a group called accounting with a group ID of 1,050. In a terminal, type in sudo groupadd -g 1050 accounting and hit enter. Type in your password when prompted. We can verify this by viewing the ETC group file. Type in cat /etc/group and hit enter. And we can see our new group at the bottom of the file. If later we want to modify attributes of our group, we can with group mod. For instance, if you want to change the group ID, we'd type in clear and then type in sudo groupmod -g 1051 accounting. This will change the group ID number to…

Contents