Benefits of using Group Accounts in Ubuntu

With the help of group accounts we can easily manage our users. There are mainly two types of groups – primary and secondary groups. The primary group is created the moment we create a user. The name of primary group is same as that of username. Apart from that, we can also assign user to a secondary group.

Benefits of using Group Accounts in Ubuntu

By grouping users, we basically control which users get access to files, directories, peripherals etc. Let’s say we have a file – xyz and we want only certain users to have read, write and execute access. Rest all can only read the file.

So, what we can do is – put these users under a group let’s say Group A. And, then assign group permissions of read, write and execute. What we have done here is – only the users who belong to Group A can read, write and execute the file intended for those users. How we will achieve that will be covered in subsequent articles.

And, simultaneously we can ensure that rest of the users only get to have read access to the file.

Apart from that, it also gives us the flexibility to add or remove users from a group anytime we want. Furthermore, we can also remove the entire group if needed.

Group related information is stored in /etc/group file in Ubuntu. Use cat command-line utility to check for groups a user is part of –

cat /etc/group

Separated by colons(:) in four fields. The last field shows us the list of users, separated by commas, who are part of that group.

In conclusion, we thought it would be great if we could write something on how we can effectively utilize group accounts before we introduce you to the concept of adding and deleting groups. Group accounts are one way to manage users’ access to certain section of the system.

Similar Posts