# How to create groups

*"A group in Active Directory is a collection of user accounts, computers, or other groups that are managed as a single unit. Groups make it easier to assign permissions and access to multiple users at once, instead of configuring each user individually. There are two main types: security groups, used for granting access to resources, and distribution groups, used for sending emails. By using groups, administrators can efficiently manage permissions and maintain better organization within the network."*

Creating these objects is very similar as we did with users.&#x20;

## Security Groups

This kind of group if used to grant access to resources (folders, other AD objects...). To create one, we first open ADUC and hit the "New Group" button.&#x20;

<figure><img src="https://942816524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQxS2I6pFaePhDpZGprC4%2Fuploads%2FKmNufcY44inyxyWPG0Nl%2Fimage.png?alt=media&#x26;token=5d6127d0-ed5d-4786-a4a9-81f4a80ccac6" alt=""><figcaption><p>Security Group</p></figcaption></figure>

Here I've named the group "Infrastructure Managers", which we will use later on when we mess up with ACLs. When it's created, I'll double click it and go to the "Members" tab to add three users.

<figure><img src="https://942816524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQxS2I6pFaePhDpZGprC4%2Fuploads%2FTImikg7BZFSZcyMGxiS7%2Fimage.png?alt=media&#x26;token=947f0762-08ee-46a3-98ef-6b7052b81914" alt=""><figcaption><p>Members of a security group</p></figcaption></figure>

## Distribution Groups

As mentioned previously, "Distribution Groups" are used for sending emails. In this AD environment, since we are willing to make it as realistic as possible (the goal is to teach how to build an HTB acceptable box) I'll create the "HR" group, which stands for "Human Resources". We will see how to use it with Exchange later on.

<figure><img src="https://942816524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQxS2I6pFaePhDpZGprC4%2Fuploads%2FNBehA5QSpq7oG01orZ0E%2Fimage.png?alt=media&#x26;token=1b9fa7a0-6b48-4721-922d-fdf709bd7ad3" alt=""><figcaption><p>Distribution Group</p></figcaption></figure>

After it's created we can add its members.

<figure><img src="https://942816524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQxS2I6pFaePhDpZGprC4%2Fuploads%2FnEhDc6Nm3Azc5FCEg17U%2Fimage.png?alt=media&#x26;token=6a744c92-4e8d-4c9d-a51d-970a84896c11" alt=""><figcaption></figcaption></figure>

Written by [ruycr4ft](https://app.hackthebox.com/profile/1253217)
