How To Add Group And Append Group Member In Redhat Linux


Add Group In Linux Redhat 



Understanding Linux Groups

Linux users can be a member of two different kinds of groups. First, there is the primary
group. Every user must be a member of a primary group and there is only one
primary group. When creating files, the primary group becomes group owner of
these files. (File ownership is discussed in detail in Chapter 7 , “Permissions Management.”)
Users can also access all files their primary group has access to. The users
primary group membership is defined in /etc/passwd; the group itself is stored in the
/etc/group configuration file.


Using groupadd to Create Groups


Another method to create new groups is by using the groupadd command. This

command is easy to use. Just use groupadd followed by the name of the group you

want to add. There are some advanced options, the only significant of them is -g ,

which allows you to specify a group ID when creating the group.


Managing Group Properties

To manage group properties, groupmod is available. You can use this command to
change the name or group ID of the group, but it does not allow you to add group
members. To do this, you use usermod . As discussed before, usermod -aG will add
users to new groups that will be used as their secondary group. Because a group does
not have many properties, it is quite common that group properties are managed
directly in the /etc/group file by using the vigr command.

In This Post You'll Learn How add Group In Linux Redhat. To add a group to the system, use the command groupadd:

groupadd <group-name>   For Add Group

usermod -aG <group-name> For Append Member In Group





Clear Your Doubt Through This Video. If You Like Video Don't Forget Like Share Subscribe.










No comments

Powered by Blogger.