How To Add User To a Group in Ubuntu [Step-By-Step Guide] ?

Figuring out how to manage teams and end users is an important ability. This is specifically correct if you have to develop and do the job with many teams and assign several end users to the group.

Incorporating users to teams in Ubuntu and also realizing how to delete end users is some thing you should really be in a position to do simply as a root user. Helpful administration of buyers and team is important in get not to compromise the security of the technique.

Guarding non-public and sensitive facts security is achievable when you give people and teams the suitable permissions.

This write-up will make clear all you need to have to know about creating teams, and about how you can insert customers to groups in Ubuntu. It will describe very simple but powerful management strategies you can use.

Comprehension the Root Person

The to start with factor you will need to understand is what the position of the root person is. As the title indicates, the root person is at the foundation of all that is finished in Ubuntu.

The root user has the authorization to perform several administrative functions. To perform any of the jobs that will be stated in this posting, you have to have to be supplied root privileges.

Ubuntu is various from most other Linux distributions this sort of as Debian and CentOs, mainly because it does not enable the root user to log in straight.

In Ubuntu, a functionality named Sudo is produced so you can execute a variety of administrative operations. A password demands to be provided with the Sudo instructions. This is to guarantee the accountability of the administrator for all operations.

The first user made immediately after the set up of Ubuntu is supplied the sudo rights. In other terms, the 1st user created is the root user, and has all the accompanying privileges.

That user is extra to the list of “sudoers” in /etc/sudoers file. Only an authorized sudoer can execute all the operations that will be talked about in this article.

Controlling Buyers

A consumer with root privileges or a sudoer may well incorporate buyers to groups in Ubuntu. Aside from currently being equipped to incorporate a consumer, there are other functions that can be executed. These will be described also. People can be extra to the Ubuntu method via the consumer interface. Consumers can also be extra by means of the command line. Also, highly developed functions need to be executed as a result of the command line.

Include User To a Group in Ubuntu By means of the GUI

As has currently been said, you can incorporate end users via the person interface. This is probably the most primary of person management operations.

The to start with stage in introducing a user by means of the graphic interface is to open up the account configurations dialogue. You can do this possibly via Ubuntu dash or by clicking the down arrow at the leading right facet of your display. Click on your username and then select account configurations.

Add User to Group Ubuntu

A person dialog will open up, in it, all the fields will be disabled by default. In purchase to do any father function with the dialog, you are going to need to offer authentication. Faucet the unlock button at the top proper corner of the user dialog.

How To Add User To a Group in Ubuntu

In the authentication dialog that opens, give wanted authentication facts, so you can move forward as administrator. Just after delivering the password, click authenticate. Only immediately after authentication will all the fields in the consumers dialog be enabled for you to perform on.

How To Add User To a Group in Ubuntu

Click increase person and the incorporate user dialog will open up for you to enter consumer information. You can choose to create both a typical or an administrative person. Soon after you have presented the required information and facts, you will be capable to click on the Include person button. Click the increase button.

Clicking the Include button produces a new user which you will be capable to see in the users dialog.

How To Add User To a Group in Ubuntu

Include Person To a Team in Ubuntu By way of the Command Line

The next way you can include end users is through the command line. The command line provides the administrator greater handle above consumer administration than working with the GUI.

To include a new person, open up the terminal both through Ubuntu sprint or by urgent Ctrl + Alt + T. With the terminal open up, add a new consumer by moving into the command:

$ sudo adduser [username]

Put the username you want to give the new person in the command.

You will have to enter a password for sudo. You will have to enter the password a next time to affirm you entered the appropriate password. You can opt for to enter biodata for the new consumer if you desire.

Right after wanting through the details you delivered if the information is appropriate enter Y and strike the Enter button.

Hitting Enter results in the new person. This seems to be a very simple and simple way of including a new consumer in Ubuntu.

Supplying Root Privileges to a Person

You can give a consumer root privileges. This will empower the person to perform different person and group management operations. To give person root privileges, you will have to edit the visudo file that includes the checklist of sudoers on the system. To open the visudo file, use this command:

$ sudo nano visudo

Entering the command will open the visudo file in the nano editor. To give full root accessibility to a specific consumer, use the command beneath:

[username] ALL= (ALL) ALL

To produce a team of person you can assign aliases to, use these instructions:

Person_Alias ADMINS = [username]
Cmnd_Alias HTTPD= /etcetera/init.d/httpd

Exit the file by pressing Ctrl + X, then enter Y, and strike the Enter button to preserve the modifications you designed.

The person will then be granted entire root accessibility.

Running Teams on Ubuntu

Apart from person administration, you can take care of complete groups on Ubuntu. In a way, it may perhaps make your tasks less difficult and more quickly. For occasion, you can select to give file obtain and administrative legal rights to a full team rather of just about every person separately.

In contrast to user management—in which some tasks could be executed either by means of the user interface and command-line— team administration can only be finished through the command line.

Adding a Team on Ubuntu

You can build a new group simply on Ubuntu. To add a new group, open up the terminal, and enter the pursuing command:

$ sudo addgroup [groupname]

You can change groupname with the name you want to give the team you made. A new team will be created at the finish of the course of action. The team will be specified a group  ID (GID).

Including Users to a Group

Right after you have made a group, you’ll normally want to insert users to the team. Also, if you’ve designed a new consumer, you will want to insert the consumer to a group. Existing people may also be added to present groups. To add an existing person to a group, use the following command:

$ sudo adduser [username] [groupname]

If you’re incorporating a consumer “joe” to group3, the command will be:

$ sudo adduser joe group3

It is also attainable to include a user to various groups. In the command, independent each and every group with a comma.

Viewing Group Information

In addition to producing groups and including customers to existing groups, you can perspective team info.

To look at the members of a team use this command:

$ groups username

To see the checklist of team customers together with their GIDs, use:

$ id username

Take note that the GID exhibited is for the major group of the member. Users can have several teams only one particular of these groups is a key team.

How to Improve the Major Group of a Person

As has been mentioned, a consumer can be in various teams. A consumer has 1 principal team and can have several secondary teams. The key group is the group for which the GID is shown in the output of the id command. To adjust the main team if a user use:

$ sudo usermod -g [newPrimaryGroup] [username]

Assigning Group Though Generating Person

We have previously revealed how to increase a person to a group or various groups. The creation of a new person, and assigning to a group can be accomplished concurrently. The command to assign a group although generating a user is:

$ sudo useradd -G [groupname] [username]

Set or Change Password for Consumer

While you are generating a new person, you have the selection of placing a password for the person. Although you can make a decision not to, it is recommended for you to established a password. This is for the stability of the program, to prevent unauthorized accessibility to private or delicate details. You assign a password employing this command:

$ sudo passwd [username]

You will then be in a position to enter a new password. You will enter the password twice to make sure it is correct.


Being aware of how to take care of buyers and teams in Ubuntu is essential for protection and effectiveness. You can deal with consumers through the user interface and command line. Taking care of groups is performed via the command line. Finding out how to include customers to a group is a quite simple task with this guide.