Results 1 to 5 of 5
Hi All
I am facing a problem in RHEL6, I want to do multiple grouping for suppose I have 1 Primary Group ADMIN and I wanna add different sub Groups ...
- 02-05-2012 #1Just Joined!
- Join Date
- Dec 2011
- Posts
- 2
Group Nesting
Hi All
I am facing a problem in RHEL6, I want to do multiple grouping for suppose I have 1 Primary Group ADMIN and I wanna add different sub Groups under it. And group nesting goes as below:
ADMIN GROUP HAVE : IT GROUP (and its users), FINANCE GROUP (and its users) etc etc etc...
How to do it... what commands I have to give for the same.
Thnx
Kishor
- 02-06-2012 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Not that I am the font of all knowledge Linux, but I am not aware of a way to do what you want, groups as members of a group. There may be tools (of which I am not aware) that will let you copy the members of one group into another, but I think that's about as good as it is going to get. Anyway, this is true for the standard Linux user/group management tools and files ( /etc/passwd, /etc/shadow, /etc/group, ... ). If you are using LDAP or YP, that may not be the case, but I haven't munged with YP for over 15 years, and I am effectively clueless about LDAP/Active-Directory.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 02-06-2012 #3Just Joined!
- Join Date
- Dec 2011
- Posts
- 2
But I just dont want to copy members to another group, I want to place one group within another, its like make a sub group I cannot find a way to do sub grouping
- 02-07-2012 #4
Afaik:you cant have nested groups.
What you can do is to shift the focus from groups to users.
usermod allows to set a required primary (-g) and arbitrary supplemental groups (-G) for each user.
usermod will set the groups given and delete the ones not given.
e.g.:
Edit: The -a flag might also interest you:Code:usermod -g users -G admin,finance talktome322
It will add a user to groups, but not delete.Last edited by Irithori; 02-07-2012 at 02:50 AM.
You must always face the curtain with a bow.
- 02-07-2012 #5
Perhaps you don't understand that users can be members of multiple groups, which is generally enough to establish suitable permissions and privileges for files and directories. Unlike the relationship between files and directories, there is nothing in Linux that describes any relationship between groups. Each group is fully independent of other groups. A user's membership in one group does not imply anything about membership in any other group.
--- rod.Stuff happens. Then stays happened.


Reply With Quote