• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

How to use OpenLDAP members groups

Scheduled Pinned Locked Moved General pfSense Questions
30 Posts 2 Posters 2.4k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    stephenw10 Netgate Administrator
    last edited by Jan 22, 2024, 6:13 PM

    You need to create user groups in pfSense with identical names. Then you can assign permissions to those groups and users authenticating with LDAP will inherit them if they are a member.

    Steve

    G 1 Reply Last reply Jan 22, 2024, 6:23 PM Reply Quote 0
    • G
      Gerard64 @stephenw10
      last edited by Gerard64 Jan 22, 2024, 6:32 PM Jan 22, 2024, 6:23 PM

      @stephenw10

      That is what i did create equal user groups thats why they show up wen i test the users the groups users and vpnusers are picked up as you can see in the image.

      The thing i mis is how can i connect the vpnusers group to the openvpn server.
      I have to set the ldap database ofcourse but only users in the ou=People,dc=domain,dc=org group is working wen i use the openvpn server.
      It does nothing with the users or vpnusers group.

      1 Reply Last reply Reply Quote 0
      • S
        stephenw10 Netgate Administrator
        last edited by Jan 22, 2024, 7:19 PM

        What permissions did you set on those groups?

        G 1 Reply Last reply Jan 22, 2024, 7:23 PM Reply Quote 0
        • G
          Gerard64 @stephenw10
          last edited by Gerard64 Jan 22, 2024, 7:25 PM Jan 22, 2024, 7:23 PM

          @stephenw10

          You mean "Assigned Privileges" on the pfsense groups?

          Both users and vpnusers have ...
          010e1b1b-a1a2-4c6a-aeb2-049d460ab958-afbeelding.png

          G 1 Reply Last reply Jan 22, 2024, 7:29 PM Reply Quote 0
          • G
            Gerard64 @Gerard64
            last edited by Gerard64 Jan 22, 2024, 7:42 PM Jan 22, 2024, 7:29 PM

            btw when i remove those "Assigned Privileges" i can still succesful test the ldap users with Diagnostics > Authentication

            1 Reply Last reply Reply Quote 0
            • S
              stephenw10 Netgate Administrator
              last edited by Jan 22, 2024, 9:22 PM

              The authentication test itself would still work when logged in as another user.

              What exactly are you seeing happen in testing?

              G 1 Reply Last reply Jan 22, 2024, 9:56 PM Reply Quote 0
              • G
                Gerard64 @stephenw10
                last edited by Jan 22, 2024, 9:56 PM

                @stephenw10

                In the tests i am doing in the above posts is logged in as admin and i test normal users i have created in ou=People,dc=domain,dc=org.

                Then i created:
                cn=users,ou=groups,dc=domain,dc=org
                cn=vpnusers,ou=groups,dc=domain,dc=org

                And added the test users, i created in ou:People, into those users and vpnusers groups as members.

                1 Reply Last reply Reply Quote 0
                • G
                  Gerard64
                  last edited by Jan 22, 2024, 10:03 PM

                  What i would like to do is using cn=users for example to login a captive-portal and the cn=vpnusers vor login openvpn server.

                  1 Reply Last reply Reply Quote 0
                  • S
                    stephenw10 Netgate Administrator
                    last edited by Jan 22, 2024, 10:50 PM

                    But how are you testing the accounts? Trying to use them to log into the VPN and they fail?

                    Captive portal users would need to inherit the 'Services: Captive Portal Login' privilege.

                    G 1 Reply Last reply Jan 22, 2024, 11:06 PM Reply Quote 0
                    • G
                      Gerard64 @stephenw10
                      last edited by Jan 22, 2024, 11:06 PM

                      I test the user accounts with Diagnostics > Authentication.
                      Only the users in ou=people work and at the same time recognizes membership of other groups, as you could see in the image above.
                      Then i also test with openvpn server in pfsense that also only works with the ou=people,dc=domain,dc=org users.

                      What i would like is the OpenVPN server to use cn=vpnusers,ou=groups,dc=domain,dc=org members as OpenVPN users.
                      When i configure cn=vpnusers,ou=groups,dc=domain,dc=org as only option in "Authentication containers" in the LDAP auth server settings then authenticating is not working anymore.

                      Somehow i should be able to configure pfsense ldap auth server to only use user members in cn=vpnusers,ou=groups,dc=domain,dc=org.

                      1 Reply Last reply Reply Quote 0
                      • S
                        stephenw10 Netgate Administrator
                        last edited by Jan 22, 2024, 11:31 PM

                        Ah I see. OK how is the LDAP server setup in pfSense?

                        G 1 Reply Last reply Jan 22, 2024, 11:49 PM Reply Quote 0
                        • G
                          Gerard64 @stephenw10
                          last edited by Jan 22, 2024, 11:49 PM

                          I made a screenshot of it but had to zoom out to have everything in one image.
                          Hopefully you can read the settings.

                          Naamloos.png

                          1 Reply Last reply Reply Quote 0
                          • S
                            stephenw10 Netgate Administrator
                            last edited by Jan 22, 2024, 11:55 PM

                            Ok so that's the ou=People server. Do you have a separate server defined for ou=Users? Or are you changing that one?

                            G 1 Reply Last reply Jan 23, 2024, 12:09 AM Reply Quote 0
                            • G
                              Gerard64 @stephenw10
                              last edited by Gerard64 Jan 23, 2024, 12:12 AM Jan 23, 2024, 12:09 AM

                              No i have one OpenLDAP server with one DIT.
                              I don't have a ou=users i only have ou=groups and ou=people.

                              In ou=groups i created cn=users and cn=vpnusers and added the ou=people users to those groups as memberUid.

                              For me this is all totally new so probably i do all kinds of stupid things.
                              I want to learn how to manage a OpenLDAP directory and i thought connecting it to pfSense would be a good little learning project.

                              ldap-2.png

                              G 1 Reply Last reply Jan 23, 2024, 12:19 AM Reply Quote 0
                              • G
                                Gerard64 @Gerard64
                                last edited by Jan 23, 2024, 12:19 AM

                                ldap-3.png

                                1 Reply Last reply Reply Quote 0
                                • S
                                  stephenw10 Netgate Administrator
                                  last edited by Jan 23, 2024, 1:01 AM

                                  You need to have 'Groups' selected there to authenticate users from that.

                                  G 1 Reply Last reply Jan 23, 2024, 1:11 AM Reply Quote 0
                                  • G
                                    Gerard64 @stephenw10
                                    last edited by Gerard64 Jan 23, 2024, 11:04 AM Jan 23, 2024, 1:11 AM

                                    I tested all that several times.
                                    If i only select ou=groups,dc=domain,dc=org

                                    I get ...
                                    29893a07-af3a-4047-a36f-2b391654e39d-afbeelding.png

                                    If i select all 3 of the options then pfSense picks only the ou=people,dc=domain,dc=org and authenticating is succesful but then those cn=users and cn=vpnusers are not used.
                                    I want only authenticate against cn=vpnusers,ou=group,dc=domain,dc=org
                                    If i only select that option i again get ...
                                    c4feeaf9-95fa-4aaf-860f-a1dbfa56ade5-afbeelding.png

                                    The only way to get a successful authentication is against the users in ou=groups,dc=domain,dc=org
                                    I tried many different settings today i found online.
                                    Only that second option works,
                                    But then i cannot use different member groups only the users that are in ou=people

                                    I did'nt know what to try next so i thought i try netgate forums.

                                    1 Reply Last reply Reply Quote 0
                                    • S
                                      stephenw10 Netgate Administrator
                                      last edited by Jan 23, 2024, 1:10 PM

                                      Hmm, odd. I'd expect those two ous to behave the same. I can see why it would be a problem if you have both selected and the same users in each.

                                      Slightly confused though because you seem to say above that selecting only ou=groups,dc=domain,dc=org both fails and is the only way to successfully authenticate? 😕

                                      G 1 Reply Last reply Jan 23, 2024, 1:33 PM Reply Quote 0
                                      • G
                                        Gerard64 @stephenw10
                                        last edited by Gerard64 Jan 23, 2024, 1:42 PM Jan 23, 2024, 1:33 PM

                                        Sorry if i am a bit confusing in the above posts.
                                        I try to be more clear.
                                        English is not my main language so i do my best 😉

                                        As you can see on the pictures i only have 2 OUs People and Groups.
                                        I created 2 normal and 1 admin users in ou=People.

                                        Then i created 3 groups in ou=Groups.

                                        My plan is to use those CN groups (in ou=groups) to authorize several services to the users by adding the users to one or more of those cn groups (cn=users & cn=vpnusers & cn=admins).

                                        As an example i added users to the cn=vpnusers so i could give them access to de pfSense OpenVPN server.
                                        And the admin user i added to the cn=admins group to give him/them admin access to pfSense.

                                        But those groups under ou=Groups ar not selectable / configurable in pfSense or not that i know off how to do that.

                                        Only ou=People,dc=domain,dc=org is successful authenticating in "Diagnostics / Authentication" and the OpenVPN server.
                                        It doesn't matter of i enable or disable the other containers (cn=users / cn=vpnusers) they don't work.
                                        I added different users to those cn groups to test them separately so i know for sure which one does or doesn't work and both don't work.

                                        Although the cn=users and cn=vpnusers is seen by pfSense as you can see in one of the images from earlier i can not do anything with them like configure OpenVPN server to use for example the cn=vpnusers to authenticate a member user of that group. Or i just don't know yet how to do that.

                                        Just like "Diagnostics / Authentication" also OpenVPN server works successfully with users in ou=People,dc=domain,dc=org.
                                        cn=users,ou=Groups,dc=domain,dc=org or cn=vpnusers,ou=Groups,dc=domain,dc=org does not work.

                                        Or wel maybe it does and i just don't know jet how to do it, how to configure it.
                                        That is what i hope to learn.

                                        G 1 Reply Last reply Jan 23, 2024, 2:01 PM Reply Quote 0
                                        • G
                                          Gerard64 @Gerard64
                                          last edited by Jan 23, 2024, 2:01 PM

                                          When i configure the LDAP server in pfSense with only the cn=vpnusers like in this image and i make one of the ou=People,dc=domain,dc=org users member of that group then auth test gives unsuccessful.

                                          dcd59640-eecb-4a0a-9327-db0043a23456-afbeelding.png

                                          1 Reply Last reply Reply Quote 0
                                          11 out of 30
                                          • First post
                                            11/30
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            This community forum collects and processes your personal information.
                                            consent.not_received