Some power users have complained about why Canonical, the parent company of Ubuntu removed the nice Users and Groups management tool that was in previous versions of Ubuntu. Remember that? The GNOME Users and Groups tool that came with Ubuntu to easily manage user and group accounts?
Yeah, I do remember. It was nice and easy. It lets you create and manage users and groups, add and remove users from groups and even create new groups. Now the question here is, why do we still need it in Ubuntu?
You see, since the introduction of the Unity Desktop in Ubuntu, the main goal of the company has always been about creating a simplified desktop experience so that the average PC user can use it without much of a hassle. It should be so simple and easy that even grandma is confortable managing it.
Now here’s the point I am trying to make. When was the last time you saw the ‘*average* user or grandma managing groups? They may create user accounts which maybe either standard or administrator accounts. Why mess around group management?
If the average user or grandma is not going to be using group management tools, then keeping it in Ubuntu isn’t a smart move. Look at Windows. Home users can create either a Standard or Administrator accounts. If you need to do more than that, let the power user search for and use Local user and Group tool in Windows.
Only power users should mess around group management. And if you’re a power user, then let me show you how to easily manage group and user accounts using the terminal.
Creating Groups Using The Command Line in Linux (Ubuntu)
For example, to create a new custom group called “Accounting” from the command line in Ubuntu, run the commands below.
sudo groupadd Accounting
Command To View All Groups
To view all groups currently created on your machine, run the commands below. A list of groups will show starting with the group name on the first column.
Adding Users To Groups
To add a user to a group called ‘Accounting’ run the commands below. It can also be used to add users to the sudo and admin groups and make them root or administrator.
sudo usermod -a -G Accounting username
Replace username with the real username on the system.
Removing Users From Groups
To remove a user from the Accounting group, run the commands below.
sudo deluser username Accounting
Replace username with the real user on the system
List Groups Users Belong To
To view the groups a user belongs to, run the commands below.
sudo groups username
Deleting Groups In Ubuntu
For example, to delete the Accounting Group, run the commands below
sudo delgroup Accounting
You can add to the list, but it just an example why we don’t need a GUI tool to manage groups in Ubuntu anymore. Feel free to add to the list by commenting below.