Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Snipe-IT
  3. How to prevent LDAP Settings overwrite?

How to prevent LDAP Settings overwrite?

Scheduled Pinned Locked Moved Solved Snipe-IT
16 Posts 4 Posters 2.1k Views 4 Watching
  • 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 Offline
      S Offline
      simong
      wrote on last edited by
      #1

      Hi,

      I currently have the problem that Cloudron overwrites the LDAP entries that I have entered in the admin interface. Is there a way to prevent this behaviour?

      Thanks,

      Simon

      nebulonN 1 Reply Last reply
      0
      • S simong

        Hi,

        I currently have the problem that Cloudron overwrites the LDAP entries that I have entered in the admin interface. Is there a way to prevent this behaviour?

        Thanks,

        Simon

        nebulonN Offline
        nebulonN Offline
        nebulon
        Staff
        wrote on last edited by
        #2

        @simong at the moment the Snipe-IT package only comes with Cloudron usermanagement integration, so it will always ensure the LDAP settings are bound to the LDAP server on your Cloudron.

        If we want to support other external user-management systems, then we have to change the package to support non-Cloudron user management as well.

        1 Reply Last reply
        0
        • Sam_ukS Sam_uk referenced this topic on
        • S Offline
          S Offline
          simong
          wrote on last edited by
          #3

          @nebulon Hi, for 2 years now I have to manually overwrite the LDAP Settings 2-3 times a week. Would it be possible to not use the cloudron LDAP in any way? Maybe with a startup script? I need some custom LDAP filters.

          girishG 1 Reply Last reply
          0
          • nebulonN Offline
            nebulonN Offline
            nebulon
            Staff
            wrote on last edited by
            #4

            The package was not changed to support non-Cloudron logins, so this is still the same situation. We haven't gotten much interest at all about changing this so far.

            1 Reply Last reply
            0
            • P Offline
              P Offline
              plusone-nick
              wrote on last edited by
              #5

              Could this not be overwritten with env var?
              Or maybe the config should be moved to env for end user config?

              ✌💙+1

              1 Reply Last reply
              0
              • S simong

                @nebulon Hi, for 2 years now I have to manually overwrite the LDAP Settings 2-3 times a week. Would it be possible to not use the cloudron LDAP in any way? Maybe with a startup script? I need some custom LDAP filters.

                girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #6

                @simong Seeking clarification. Are you using another LDAP server altogether or just wanting to modify a filter while using the Cloudron LDAP server? Depending on your situation, we can fix the package.

                S 1 Reply Last reply
                1
                • girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by
                  #7

                  Currently, we configure it like this:

                          $settings = Setting::first();
                          $settings->custom_forgot_pass_url = env('CLOUDRON_API_ORIGIN') . '/login.html?passwordReset';
                          $settings->ldap_enabled = 1;
                          $settings->ldap_server = env('CLOUDRON_LDAP_URL');
                          $settings->ldap_uname = env('CLOUDRON_LDAP_BIND_DN');
                          $settings->ldap_pword = $encrypter->encrypt(env('CLOUDRON_LDAP_BIND_PASSWORD'));
                          $settings->ldap_basedn = env('CLOUDRON_LDAP_USERS_BASE_DN');
                          $settings->ldap_filter = '&(objectclass=user)';
                          $settings->ldap_username_field = 'username';
                          $settings->ldap_lname_field = 'sn';
                          $settings->ldap_fname_field = 'givenname';
                          $settings->ldap_auth_filter_query = 'username=';
                          $settings->ldap_email = 'mail';
                          $settings->ldap_pw_sync = 0;
                          $settings->save();
                  
                  1 Reply Last reply
                  0
                  • girishG girish

                    @simong Seeking clarification. Are you using another LDAP server altogether or just wanting to modify a filter while using the Cloudron LDAP server? Depending on your situation, we can fix the package.

                    S Offline
                    S Offline
                    simong
                    wrote on last edited by
                    #8

                    @girish I want to use this filter:
                    &(objectCategory=person)(objectClass=user)(department=*)(title=*)
                    I use the Azure ADDS Server directly to use this filter.

                    It would be really great to have these settings in the env file.

                    1 Reply Last reply
                    1
                    • nebulonN Offline
                      nebulonN Offline
                      nebulon
                      Staff
                      wrote on last edited by
                      #9

                      just for clarification, you are using and configuring azure as your ldap server for this app, not using CLOUDRON_LDAP_URL and such?

                      S 1 Reply Last reply
                      0
                      • P Offline
                        P Offline
                        plusone-nick
                        wrote on last edited by
                        #10

                        i think they want $settings->ldap_filter = env('CLOUDRON_LDAP_FILTER');

                        ✌💙+1

                        1 Reply Last reply
                        1
                        • nebulonN nebulon

                          just for clarification, you are using and configuring azure as your ldap server for this app, not using CLOUDRON_LDAP_URL and such?

                          S Offline
                          S Offline
                          simong
                          wrote on last edited by
                          #11

                          @nebulon yes
                          I just want to define the LDAP server, filter, user, basedn, password and fields in the env file or somewhere else or have the option to disable that the ldap settings get overwritten after every restart.

                          1 Reply Last reply
                          1
                          • girishG Offline
                            girishG Offline
                            girish
                            Staff
                            wrote on last edited by
                            #12

                            @simong I have published a new package where you can install with user management disabled. Importing your existing setup might be a bit complicated though because we don't support LDAP support being turned on/off dynamically. Maybe you can try this:

                            • Update your existing installation to new package
                            • Install a fresh installation (in another subdomain) with no user management
                            • Import the latest backup of old installation into the fresh installation - https://docs.cloudron.io/backups/#import-app-backup
                            • Configure LDAP in new installation
                            • If everything works ok, you can switch things over.
                            1 Reply Last reply
                            1
                            • S Offline
                              S Offline
                              simong
                              wrote on last edited by simong
                              #13

                              @girish I did a fresh installation and added some ldap credentials there. But after a reboot, they are overwritten with empty values and some predefined filters:
                              2f223ab8-c648-40f7-8dd5-573a581e500a-image.png
                              ba67a57f-307f-44bd-9d89-f89fa75cae4e-image.png

                              This is without any import of a backup or other changes.

                              girishG 1 Reply Last reply
                              0
                              • S simong

                                @girish I did a fresh installation and added some ldap credentials there. But after a reboot, they are overwritten with empty values and some predefined filters:
                                2f223ab8-c648-40f7-8dd5-573a581e500a-image.png
                                ba67a57f-307f-44bd-9d89-f89fa75cae4e-image.png

                                This is without any import of a backup or other changes.

                                girishG Offline
                                girishG Offline
                                girish
                                Staff
                                wrote on last edited by
                                #14

                                @simong I can reproduce this, seems like a bug in the package I just released.

                                1 Reply Last reply
                                0
                                • girishG Offline
                                  girishG Offline
                                  girish
                                  Staff
                                  wrote on last edited by
                                  #15

                                  @simong I have published a new one, can you re-install the package and try?

                                  S 1 Reply Last reply
                                  1
                                  • girishG girish

                                    @simong I have published a new one, can you re-install the package and try?

                                    S Offline
                                    S Offline
                                    simong
                                    wrote on last edited by
                                    #16

                                    @girish It works now 👍

                                    1 Reply Last reply
                                    0
                                    • S simong marked this topic as a question on
                                    • S simong has marked this topic as solved on
                                    Reply
                                    • Reply as topic
                                    Log in to reply
                                    • Oldest to Newest
                                    • Newest to Oldest
                                    • Most Votes


                                      • Login

                                      • Don't have an account? Register

                                      • Login or register to search.
                                      • First post
                                        Last post
                                      0
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular
                                      • Bookmarks
                                      • Search