LDAP nested groups

sancheli

New Member
Oct 4, 2022
10
0
1
Hi
Please help me with the LDAP settingsNow I have such settings and groups and users are synchronized But at the same time, I don't see nested groups. I have a security group in which there are both users and other groups, he sees users but does not see nesting Tell me what needs to be added so that PMG can see the nested groups
 

Attachments

  • Снимок экрана 2024-01-19 в 16.24.53.png
    Снимок экрана 2024-01-19 в 16.24.53.png
    76.8 KB · Views: 16
Hi
Please help me with the LDAP settingsNow I have such settings and groups and users are synchronized But at the same time, I don't see nested groups. I have a security group in which there are both users and other groups, he sees users but does not see nesting Tell me what needs to be added so that PMG can see the nested groups
Hello Sancheli,

I came across your post while trying to solve a very similar issue I was having with the LDAP stuff and Proxmox.
Having no experience with LDAP search strings, writing this out helped better understand how to solve my own issue, so thank you for your post!

Example 1: Query for Direct Group Members:
This LDAP query retrieves users who are direct members of a specified group.​
(&(objectClass=user)(memberOf=CN=GroupName,OU=SecurityGroups,DC=contoso,DC=com))

Key Components:​
1. objectClass=user: Identifies objects with the "user" class.​
2. memberOf=CN=GroupName,OU=SecurityGroups,DC=contoso,DC=com: Filters objects that are direct members of the specified group distinguished name.​

The & at the beginning represents an "AND" operator, ensuring results match both filter conditions.​


Example 2: Query for Direct and Indirect Group Members:
This LDAP query retrieves users who are directly or indirectly members of a specific group.​
(&(objectClass=user)(memberOf:1.2.840.113556.1.4.1941:=CN=GroupName,OU=SecurityGroups,DC=contoso,DC=com))

Key Components:​
1. objectClass=user: Identifies objects with the "user" class.​
2. memberOf:1.2.840.113556.1.4.1941:=CN=GroupName,OU=SecurityGroups,DC=contoso,DC=com: Utilizes a matching chain rule (OID 1.2.840.113556.1.4.1941) to include both direct and nested members of the specified group distinguished name.​


Example 3: Query for a Specific Group:
This LDAP query retrieves information about a specific group.​
(&(objectClass=group)(distinguishedName=CN=GroupName,OU=SecurityGroups,DC=contoso,DC=com))

Key Components:​
1. objectClass=group: Identifies objects with the "group" class.​
2. distinguishedName=CN=GroupName,OU=SecurityGroups,DC=contoso,DC=com: Specifies that the group's distinguished name attribute must match the provided value.​


Example 4: Query for Nested Groups within a Specific Group:
This LDAP query retrieves groups that are direct or nested members of a specific group.​
(&(objectClass=group)(memberOf:1.2.840.113556.1.4.1941:=CN=GroupName,OU=SecurityGroups,DC=contoso,DC=com))

Key Components:​
1. objectClass=group: Specifies objects with the class of "group".​
2. memberOf:1.2.840.113556.1.4.1941:=CN=GroupName,OU=SecurityGroups,DC=contoso,DC=com: Utilizes a matching chain rule (OID 1.2.840.113556.1.4.1941) to return member objects of the specified distinguished name.​


Example 5: Query for Groups Directly or Indirectly Related to a Specific Group (Including the Specified Group):
This LDAP query retrieves groups directly or indirectly related to a specific group, including the specified group itself, combining Examples 3 and 4 from above.​
(|(&(objectClass=group)(distinguishedName=CN=GroupName,OU=SecurityGroups,DC=contoso,DC=com))(&(objectClass=group)(memberOf:1.2.840.113556.1.4.1941:=CN=GroupName,OU=SecurityGroups,DC=contoso,DC=com)))
^ The above query needs to be on a single line, not two.​

Key Components:​
1. objectClass=group: Specifies objects with the class of "group".​
2. distinguishedName=CN=GroupName,OU=SecurityGroups,DC=contoso,DC=com: Requires the distinguished name attribute of the group object to match the specified distinguished name.​
3. memberOf:1.2.840.113556.1.4.1941:=CN=GroupName,OU=SecurityGroups,DC=contoso,DC=com: Utilizes a matching chain rule (OID 1.2.840.113556.1.4.1941) to return nested objects of the specified distinguished name.​

The | at the beginning is an "OR" operator, which returns results matching either of the two filter conditions, or both.​


For our setup, examples 2 and 5 did the trick for me.

Help this helps!
-Rob
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!