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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved import users into ldap changes case?

    Support
    3
    8
    185
    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.
    • P
      perler last edited by

      We are importing users from a nextcloud installation into cloudron LDAP.

      when we import this file:

      Tester,tester@domain.com,,Tester Name,
      

      we get this user:
      2119eb13-c4ac-4251-b525-d46021e3ca72-image.png

      The case of the username has changed from Tester to tester, which is a problem as we sync files from the old nextcloud installation and the data folder of user Tester is

      ../data/Tester
      

      whereby in the cloudron installation it is

      ../tester
      

      which gets created at first login instead of using the existing directory.

      bug or feature?

      jdaviescoates 1 Reply Last reply Reply Quote 0
      • jdaviescoates
        jdaviescoates @perler last edited by jdaviescoates

        @perler said in import users into ldap changes case?:

        feature

        Pretty sure it's intentional that LDAP usernames are always lowercase, as I seem to remember that being included in the release note announcement posts for one of the recent-ish updates...

        Yep, here it is:

        @girish said in Cloudron 7.2 released:

        Ensure LDAP usernames are always treated lowercase

        I use Cloudron with Gandi & Hetzner

        P 1 Reply Last reply Reply Quote 1
        • P
          perler @jdaviescoates last edited by

          @jdaviescoates all right, this complicates things. Is there a reason for this?

          jdaviescoates 1 Reply Last reply Reply Quote 0
          • jdaviescoates
            jdaviescoates @perler last edited by

            @perler said in import users into ldap changes case?:

            Is there a reason for this?

            Presumably, yes.

            I think it's because lots of apps require lowercase usernames.

            See eg

            @nebulon said in External Directory synchronisation:

            Cloudron will always lowercase the username, this is required also to be compatible with apps and how they handle usernames

            I use Cloudron with Gandi & Hetzner

            P 1 Reply Last reply Reply Quote 1
            • P
              perler @jdaviescoates last edited by

              @jdaviescoates this is quite obviously not quite true, but thanks, we will manage 😉

              jdaviescoates 1 Reply Last reply Reply Quote 0
              • jdaviescoates
                jdaviescoates @perler last edited by

                @perler said in import users into ldap changes case?:

                this is quite obviously not quite true

                what is not quite true? some apps do require lowercase usernames, no?

                I use Cloudron with Gandi & Hetzner

                P 1 Reply Last reply Reply Quote 1
                • P
                  perler @jdaviescoates last edited by

                  @jdaviescoates yes, but some apps are case aware, here: nextcloud. I think it's not quite the correct decision to force lowercase as if it is 1968 but as I said, we can work around this.

                  1 Reply Last reply Reply Quote 1
                  • girish
                    girish Staff last edited by girish

                    As @jdaviescoates said, we force small case for compatibility. I understand that in your specific context that being case sensitive might work though.

                    LDAP itself has a bunch of case sensitivity madness. See https://stackoverflow.com/questions/29897684/is-ldap-dn-case-insensitive and https://www.ibm.com/docs/en/oala/1.3.5?topic=SSPFMY_1.3.5/com.ibm.scala.doc/install/iwa_pinst_ldap_cnf_cse_sen_t.html . I remember we tried to make this case preserving but this causes lots of subtle very hard to debug failures.

                    There's a lot of things in play here 🙂 File systems, databases, frameworks, languages... each has their own level of case sensitivity support when it comes to usernames.

                    1 Reply Last reply Reply Quote 1
                    • Topic has been marked as a question  girish girish 
                    • Topic has been marked as solved  girish girish 
                    • First post
                      Last post
                    Powered by NodeBB