Friday, 20 December 2013

How to create group in Red Hat Linux

Hello friend I am Deepak Saini Now i am trying to explain groups in the red hat

Groups :-One or more users combined and same access on the machine is called group.
Groups are two types in Red Hat
1 Primary and inital group
2 Secondary or supplementry

Primary Group :-Permissions replicate.Group qwnership defined for only primary group.User can have only one initial group

Secondary Group :-  Permissions are replicate.No ownership defined for secondary.User can have any no of supplementary group 

Setups
1 We have need users before create the groups so you can create users to make a group read here for user creating
2We are using the groupadd command for add the group in the Red Hat
   syntax :- groupadd <group name>


here group add is the command and group name is the name of the group
3 we check the group is create or not we check the /etc/group file in this file the entry your group.Then your group is created. 
How to add users in the Groups 
1 We are using the usermod command for this work  
 synatx:- usermod -g <group Name> <UserName> 
 here usermod is the command and -g is the option to add the primary  group  

How to add a user secondary group 
1 We are using same command in this usermod
 syntaxx :- usermod -G <group name> <user name>
here same usermod is command and -G for the secondary group   and username for user name

0 comments:

Post a Comment