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

    Error setting up ldap backend

    Scheduled Pinned Locked Moved 2.1 Snapshot Feedback and Problems - RETIRED
    7 Posts 4 Posters 3.6k 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.
    • B
      bruno
      last edited by

      Hi,
      I have an issue setting up an LDAP server in 2.1-BETA0 (amd64) built yesterday.
      I filled in the form with exactly the same settings from 2.0 and saved, but after clicking on "Select" to pick up auth containers the GUI becomes unresponsive for some minutes then "Could not connect to the LDAP server. Please check your LDAP configuration.".

      in system.log

      
      php: /system_usermanager_settings_ldapacpicker.php: ERROR! ldap_get_user_ous() could not bind to server .
      

      thanks
      B.

      1 Reply Last reply Reply Quote 0
      • E
        eri--
        last edited by

        The user you have used to authenticate to LDAP is wrong.
        Check the password of that user and it should behave correctly.

        1 Reply Last reply Reply Quote 0
        • B
          bruno
          last edited by

          I wish the password was wrong, but I can connect w/o problem on pf 2.0 and also with an ldap browser using the same password.
          Isn't something missing in that error, like the server name before the dot?

          1 Reply Last reply Reply Quote 0
          • E
            eri--
            last edited by

            Can you show the url used to open the window.
            You even should have it shown on the opened window or can get it through developers tools in chrome under network settings.
            Something is not getting field properly there and the request might be going and trying anon binding.

            1 Reply Last reply Reply Quote 0
            • B
              bruno
              last edited by

              Here's the URL:

              2.1beta

              https://pfsense21/system_usermanager_settings_ldapacpicker.php?port=389&host=ldapserver&scope=subtree&basedn=DC=domain,DC=local&binddn=ldapuser&bindpw=ldappass&urltype=TCP%20-%20Standard&proto=3&authcn=cn=Users,DC=domain,DC=local&cert=
              

              2.0.1-rel

              https://pfsense201/system_usermanager_settings_ldapacpicker.php?port=389&host=ldapserver&scope=subtree&basedn=DC=domain,DC=local&binddn=ldapuser&bindpw=ldappass&urltype=TCP%20-%20Standard&proto=3&authcn=CN=Users,DC=domain,DC=local&cert=4d9304d33184c
              
              1 Reply Last reply Reply Quote 0
              • M
                moh10ly
                last edited by

                I had the same issue but I solved it and thought to share it with you guys. I would like just first to explain why this error persists!

                When using special characters in passwords which authenticates to the Active Directory in order to retrieve the users unit, These passwords get transmitted html-encodedly.

                So for example the password: abc1" becomes abc1&qout; which obviously leads to a failure.

                It seems that this bug could be fixed by adding this code to the Active directory plugin " html_decode_entities($password)" according to similar issue I noticed in another forum, just to be honest I'm not good at all with HTML/PHP coding.

                so in order to solve your problem, create a user on AD e.g. (Pfsense) and the password is plain simple e.g. (pfsense) no numbers of special characters involved.

                test it by clicking Select next to Authentication containers.

                Power is Knowledge.

                1 Reply Last reply Reply Quote 0
                • jimpJ
                  jimp Rebel Alliance Developer Netgate
                  last edited by

                  The quoting there has other issues actually. If a user has international characters it needs a call to utf8_encode/utf8_decode in various places as well. I'm not sure why it's run through html encoded there, it probably shouldn't be done at that stage, only if the text needs transmitted back to the user in the GUI somewhere.

                  Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.