Copyright (C) 2008-2020 Oliver Bohlen.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU Free Documentation License".
This documentation comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
Here is an example how I managed putting posix groups in other groups (nested groups) over OpenLDAP.
If you want to use this solution you need the following howto(s) finished:
This is an example LDIF-File for groups in groups. First an "normal" group users with id 100 and three Users is inserted.
Then the users group is put into the audio group. The output of "getent group audio" will tell you that there are user1, user2 and user3 in the audio group.
And voila. You have a nested group or a group in a group.
So change the file according your needs and insert it with
ldapadd -x -D cn=Manager,dc=example,dc=com -W -f /etc/openldap/groupsingroups.ldif
dn: cn=users,ou=Group,dc=example,dc=com objectClass: gaboshGroup objectClass: posixGroup objectClass: top uniqueMember: cn=user1,ou=Users,ou=People,dc=example,dc=com uniqueMember: cn=user2,ou=Users,ou=People,dc=example,dc=com uniqueMember: cn=user3,ou=Users,ou=People,dc=example,dc=com gidNumber: 100 cn: users dn: cn=audio,ou=Group,dc=example,dc=com objectClass: posixGroup objectClass: top objectClass: gaboshGroup cn: audio gidNumber: 18 uniqueMember: cn=users,ou=Group,dc=example,dc=com
This is the schema for using nested groups (groups in groups)
objectclass ( 18.104.22.168.4.1.35312.1 NAME 'gaboshGroup' DESC 'adds uniqueMember attribut for groups' SUP top AUXILIARY MAY ( uniqueMember ) )
Please send a feedback to: doc<at>gabosh.netHowto listing
Here you can find the official Gentoo Linux Forums where you can find a lot of answers.
Here a link to the official Gentoo Linux Homepage.