Sharing Ilmu

Sharing for useful things

How To Create Additional Group (Supplementary Group) on Linux OS

Helow Guys, In this tutorial I’ll explain about the way of create supplementary group or additional group on linux system.  Those configuration usefull if you work in corporation and need for share a directory/files in one directory access with different user on one linux system environtment.

First create group named CORP and then check on /etc/group for make sure group is already exist.

As shown image above you can see the group CORP have GID 1002.

Now create some user named is user1 and user2 with CORP as the suppementary group.

Check the configuration on /etc/passwd and /etc/group.

As the Shown image above the user1 and user2 has been included on CORP group.

Last exercise we will try to create new user and then add CORP as the supplementary group later.

useradd user3

Modify user3 to add supplementary group

usermod -aG 1002 user3

Then, check on /etc/group files.

Let’s Try

z

Leave a Reply

Your email address will not be published. Required fields are marked *.

*
*
You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>