Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm having a problem with groups. I've set up three groups,
groupA, groupB and groupC.
groupA has users adam, and ben as its members.
groupB has groupA, and users chris and doug as its members.
groupC has users eddie and freddie as its members.
However, a problem arises when I try to add groupB to groupC as a member.
If I log in as adam, and type the command groups, I see groupA and groupB, but not groupC.
Am I missing something? Am I doing something wrong? Is there something inherently wrong with nesting groups that much?
This is on a server running Mandrake 8.0, with a kernel patched to 2.4.18.
If you don't want to add separate group membership for all users, setGid their shared dir and make sure their umasks don't mess up, then you probably mean something like Groups members of other groups, using Linux ACL's. Seems using ACL's is a bit rough around the edges (if not totally unusable) as far as I can see.
Hrm. I did already look at the thread you mentioned, but it didnt seem to be the same problem as mine. I am actually listing users in each of the groups, but the groupC is supposed to have users as well as groupB in it, just like groupB has users as well as groupA in it, but it doesnt seem to work.
I really want to know if there's a limit to how much I can nest, ie., is it a "known bug" so to speak?
Traditionally, unix groups cannot be nested at all. If someone has changed the traditional behaviour on your distribution, I'd love to hear about it. This is something that would be a significant (and very difficult) enhancement.
On some distros (Red Hat linux comes to mind) of unix-derived systems, a unique group is created for each user, so that if you have a user named "bonehead" there will also be a group named "bonehead". This often confuses people and is probably not a good solution (although I understand why Red Hat did it). If you have a user with the same name as a group, that might explain why nesting seems to work in some circumstances.
If you are using the Shadow Suite, you can use the tools "pwck" and "grpck" to check your /etc/passwd and /etc/group files for errors. If you are using something more sophisticated (NIS, Hesiod, LDAP, whatever) you will have to consult whoever set up your user account provisioning system.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.