LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Adding Groups to Groups (https://www.linuxquestions.org/questions/linux-security-4/adding-groups-to-groups-710654/)

measekite 03-10-2009 10:50 PM

Adding Groups to Groups
 
Using a GUI how to you add one group (with users) to another group (with other users)? In other words if you add Group A to Group B then B has all of the users from A plus its own.

When you then add more users to A they will automatically show up in B.

Also how do you set the rights for each group using the GUI?

emi_ramo 03-11-2009 09:38 AM

It's not possible. You can only add users to groups. Alternatively, you can create a GUI which does such actions by internally knowing that all users added to/removed from some group have to be also added/removed from the other. And, if you don't know how to do such application, you can write on such application "wishes list" to do so.

A GUI applications that work with users and groups is KUser. You can go to their app page and add this "wish". If they really don't like your idea, you can do a fork of the app (KUserAdvanced, for example) to acomplish your wish. And, again, if you don't know programming, you can pay someone(s) to do so ;)

Regards,
emi

SlowCoder 03-11-2009 12:03 PM

I'm not so sure it's not possible. I remember asking the same question and doing some research to find the answer to this same question. I was pretty new to Linux at the time, but I think I got it working.

I think it was some obscure ability that I can't find documentation on any more.

If I remember correctly (and I may not) - Assuming group1 is supposed to become a member of group2, you could add group1 into group2's definition in /etc/group. But there was some sort of special marker to define group1 as a group. I don't remember if it was a %, @ or what. But after I did that, it seemed to work for me.

I posted my findings here at LQ, but that was some time ago, and it appears my post has been expired (no longer listed).

measekite 03-11-2009 12:40 PM

Thanks
 
Quote:

Originally Posted by SlowCoder (Post 3472040)
I'm not so sure it's not possible. I remember asking the same question and doing some research to find the answer to this same question. I was pretty new to Linux at the time, but I think I got it working.

I think it was some obscure ability that I can't find documentation on any more.

If I remember correctly (and I may not) - Assuming group1 is supposed to become a member of group2, you could add group1 into group2's definition in /etc/group. But there was some sort of special marker to define group1 as a group. I don't remember if it was a %, @ or what. But after I did that, it seemed to work for me.

I posted my findings here at LQ, but that was some time ago, and it appears my post has been expired (no longer listed).

This is one area where Windows (nested groups with assignments) is a little more advanced in this area.

emi_ramo 03-11-2009 12:53 PM

Quote:

Originally Posted by measekite (Post 3472079)
This is one area where Windows (nested groups with assignments) is a little more advanced in this area.

Not agree at all.... Have you tried to install emule on wLive? User permissions are not obvious: too difficult and possible recursions, no text files to touch (really nasty, żuh?), possibility to add positive and negative groups, etc. I largely prefer linux groups, where you can easily see if a user belongs to a group or not and then, if s/he has write permissions to a file (for example).

For a 'masterization' of groups like said before, it's preferable a program that does the work for you and for the system (group nesting should also take system recurses if the chains get too long or recursed).

So, again, make your own program (and share it, of course :D ) to pseudo-nest groups on /etc/group .

Just a note: may be SELinux can help doing this kind of things but... it's a part of Linux I really know nothing about.

Linuxchuck 03-11-2009 01:33 PM

Quote:

Originally Posted by measekite (Post 3471407)
Using a GUI how to you add one group (with users) to another group (with other users)? In other words if you add Group A to Group B then B has all of the users from A plus its own.

When you then add more users to A they will automatically show up in B.

Also how do you set the rights for each group using the GUI?

Unfortunately, linux does not support nested groups. However, you could probably achieve something close to the end result you are after by using filesystem ACLs. If you could provide an example of one of the "end results" you are looking to achieve, perhaps we could come up with a viable solution.

JZL240I-U 03-12-2009 02:11 AM

Quote:

Originally Posted by SlowCoder (Post 3472040)
...I posted my findings here at LQ, but that was some time ago, and it appears my post has been expired (no longer listed).

No. To my knowledge nothing is deleted on LQ, since its officially stated purpose is to collect knowledge and make it accessible. Check with the "My Threads" and "My Posts" buttons in the right side panel how far back your posts are preserved and contact the mods if necessary.

You can also do an advanced search entering your nick and the appropriate keywords which might give you better results. HTH.

P.S.: Sorry for the icon in the header. I didn't put it there and I can't get it removed :(.


All times are GMT -5. The time now is 09:27 PM.