Home / VPS & Dedicated / Changing a User's Group in Linux

Changing a User's Group in Linux

Tux Linux mascot
Question: How do I add a user to a group in Linux?

Answer: Now that you have created a new user, you may need to add the user to a special group. To accomplish that, follow these easy steps.

1. Login to your server via SSH.
2. Become root:
su

Let’s assume the username is “mrtest” and you want to add it to the “audio” group.

3. From the root command prompt, enter:

useradd -G audio mrtest

If the group does not already exist, you need to create it first with groupadd:

groupadd audio

Once a group is created, you can add as many users to it as you need.

Check Also

servers

Importance of web hosting to business

The world of business is very ruthless and unfair in some cases. It is a …