---
description: Group of users are here
---

# Groups

Grouping the users is a common task for user management, because the groups not only organize users in a consistent manner, but they also derive permissions and other rules to all the users that are part in a group. For example, if a group has a permission that would allow users inside a group to use administrative commands, all the users will get that permission.

To derive the permissions to some of the users that you've added to a group, you'll have to grant a permission to the group permissions. This is explained in depth in the Permissions page, which you can consult below:

{% content-ref url="permissions" %}
[permissions](permissions)
{% endcontent-ref %}

## Operations

There are common operations that you can do to manage the groups and their permissions.

### Adding groups

<figure><img src="https://1646631310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6SuJr8TEJ774XHJd2U2D%2Fuploads%2Fgit-blob-af61bc8a58f70e579f21e8569db8a93aaf6adde6%2F052-addgroup.png?alt=media" alt=""><figcaption></figcaption></figure>

To add a group to the list of available groups, you can use the `addgroup` command. You need to specify a group name that will organize the user accounts based on the role and what is this group for.

### Removing groups

<figure><img src="https://1646631310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6SuJr8TEJ774XHJd2U2D%2Fuploads%2Fgit-blob-dfd772657d2228b088b2215ea972339ea649c557%2F053-rmgroup.png?alt=media" alt=""><figcaption></figcaption></figure>

You can remove a group from the list of available groups if you no longer want a specific group using the `rmgroup` command. You need to specify a group name that exists to be able to remove it.

### Adding users to a group

<figure><img src="https://1646631310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6SuJr8TEJ774XHJd2U2D%2Fuploads%2Fgit-blob-2b50633ca92a677b43b7bf459cbd4fa4dc3110ae%2F054-addusertogroup.png?alt=media" alt=""><figcaption></figcaption></figure>

You can add a user to an existing group to organize a user by using the `addusertogroup` command so that the user gets permissions from the group. You need to specify an existing user and an existing group that the user didn't join to be able to add a user to the group.

### Removing users from a group

<figure><img src="https://1646631310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6SuJr8TEJ774XHJd2U2D%2Fuploads%2Fgit-blob-503ecafee314198a71f7d8631213d5c1802159cc%2F055-rmuserfromgroup.png?alt=media" alt=""><figcaption></figcaption></figure>

You can remove an unwanted user from an existing group using the `rmuserfromgroup` command so that the target user is no longer a member of that target group. You need to specify an existing user and an existing group that the user joined to be able to remove a user from the group.

## Permission operations

In order to get an idea of how to manipulate with the group permissions, see the `Permissions` page linked above.
