• Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • core
    • 2.138.2, fresh installation from the Ubuntu apt repository

      I just unsuccessfully tried setting up a brand new Jenkins instance on a brand new server. Everything worked fine, except it's not possible to create user accounts, at all. The issue is the same when using the setup wizard ("create first new user") as when going to Manage Jenkins -> Manage Users -> Create new user.

      The symptom is that no matter what is entered in the form (leaving all fields blank has the same effect as filling in everything correctly), when you press submit you simply get a HTTP 200 response. No error messages, nothing in jenkins.log, simply nothing happens.

       

      I reverted to 2.121.3 using "apt-get install jenkins=2.121.3" and everything worked just fine.

          [JENKINS-54143] Cannot create new users in 2.138.2

          Oleg Nenashev added a comment -

          Any system logs for the broken instance?

          CC danielbeck

          Oleg Nenashev added a comment - Any system logs for the broken instance? CC danielbeck

          Daniel Beck added a comment -

          There's a known problem with the classic UI not showing error messages (JENKINS-52869), but this one is new to me.

          Daniel Beck added a comment - There's a known problem with the classic UI not showing error messages ( JENKINS-52869 ), but this one is new to me.

          Foo Bar added a comment -

          I don't have any logs, I ended up installing an older version to get the whole thing going. It should be fairly easy to reproduce though since I tried apt-get purge jenkins followed by apt-get install jenkins the first time I bumped into this, and the same issue happened.

          Foo Bar added a comment - I don't have any logs, I ended up installing an older version to get the whole thing going. It should be fairly easy to reproduce though since I tried apt-get purge jenkins followed by apt-get install jenkins the first time I bumped into this, and the same issue happened.

          Daniel Beck added a comment - - edited

          It should be fairly easy to reproduce

          I cannot. Both customizing the 'admin' user in the setup, and creating new users in the built-in security realm afterwards works for me on 2.138.2. While I used the docker image for convenience, I cannot imagine what could be different with the RPM to cause this.

          Daniel Beck added a comment - - edited It should be fairly easy to reproduce I cannot. Both customizing the 'admin' user in the setup, and creating new users in the built-in security realm afterwards works for me on 2.138.2. While I used the docker image for convenience, I cannot imagine what could be different with the RPM to cause this.

          Foo Bar added a comment -

          Okay, I guess I can try again myself. What information do you need, logs etc.?

          Foo Bar added a comment - Okay, I guess I can try again myself. What information do you need, logs etc.?

          Foo Bar added a comment -

          For the record I tried both with a very basic nginx reverse proxy as well as without, same result.

          Foo Bar added a comment - For the record I tried both with a very basic nginx reverse proxy as well as without, same result.

          Until the solution, who need create new users, can only copy some user and modify (password, name, email) under ui.

           

          cp -a /var/jenkins_home/users/user-old /var/jenkins_home/users/user-new
          

          Dont forget to change permissions, password, name and email.

          Flavio Rescia Dias added a comment - Until the solution, who need create new users, can only copy some user and modify (password, name, email) under ui.   cp -a / var /jenkins_home/users/user-old / var /jenkins_home/users/user- new Dont forget to change permissions, password, name and email.

          Daniel Beck added a comment -

          What information do you need, logs etc.?

          Jenkins system log, HTTP access log, client side HTTP log (e.g. har)

          Daniel Beck added a comment - What information do you need, logs etc.? Jenkins system log, HTTP access log, client side HTTP log (e.g. har)

          I'm seeing the same on version 2.150 (updated recently from 2.146). Thanks for the workaround. Sorry for lack of logs, I checked those and there is nothing that would stand out as related. 

          The form just does:

          POST https://jenkins-url/securityRealm/createAccountByAdmin

          and the response is HTTP 200 with the same form.

          Ryszard Perkowski added a comment - I'm seeing the same on version 2.150 (updated recently from 2.146). Thanks for the workaround. Sorry for lack of logs, I checked those and there is nothing that would stand out as related.  The form just does: POST https://jenkins-url/securityRealm/createAccountByAdmin and the response is HTTP 200 with the same form.

          Daniel Beck added a comment -

          and the response is HTTP 200 with the same form.

          Is there a response body?

          Daniel Beck added a comment - and the response is HTTP 200 with the same form. Is there a response body?

          Daniel Beck added a comment -

          Okay, checked the code. The situation you describe can happes entirely without visible error message, if the user creation failed for any of these reasons:

          • Password didn't match
          • Password is required
          • User name is required
          • User name must only contain alphanumeric characters, underscore and dash
          • Invalid e-mail address
          • User name is already taken

          Daniel Beck added a comment - Okay, checked the code. The situation you describe can happes entirely without visible error message, if the user creation failed for any of these reasons: Password didn't match Password is required User name is required User name must only contain alphanumeric characters, underscore and dash Invalid e-mail address User name is already taken

          danielbeck: I've tried providing all proper data, its still failing with same issue. No Error in UI, Logs etc. Issue found in 2.138.3 version also.

          Shahal Tharique added a comment - danielbeck : I've tried providing all proper data, its still failing with same issue. No Error in UI, Logs etc. Issue found in 2.138.3 version also.

          Marcello Romani added a comment - - edited

          I have encountered the same problem.

          The fix for me was replacing a dot in the username with an underscore.

          E.g.: name.surname --> name_surname

          That is in line with what danielbeck described above, in particular:

          User name must only contain alphanumeric characters, underscore and dash

           

          Marcello Romani added a comment - - edited I have encountered the same problem. The fix for me was replacing a dot in the username with an underscore. E.g.: name.surname --> name_surname That is in line with what danielbeck described above, in particular: User name must only contain alphanumeric characters, underscore and dash  

          Observing the same with a brand new Jenkins 2.150.1 installation (on Oracle Enterprise Linux 6.8, using JRE 1.8.0_181). User name I tried was "sample".

          Andreas Fester added a comment - Observing the same with a brand new Jenkins 2.150.1 installation (on Oracle Enterprise Linux 6.8, using JRE 1.8.0_181). User name I tried was "sample".

          Leandro Guida added a comment -

          Same thing for me in version 2.150.1. Can't create  a user, no error message and no log entry.

           

          Leandro Guida added a comment - Same thing for me in version 2.150.1. Can't create  a user, no error message and no log entry.  

          Stephan Wezel added a comment - - edited

          I can reproduce the bug with 2.150.2:

          username: test.test
          pw: test
          e-mail: test@test.com

          The name doesn't follow the rules mentioned by Daniel Beck but jenkins doesn't show any error message.

          With 2.164 a proper error message is reported that the username is not valid

          Stephan Wezel added a comment - - edited I can reproduce the bug with 2.150.2: username: test.test pw: test e-mail: test@test.com The name doesn't follow the rules mentioned by Daniel Beck but jenkins doesn't show any error message. With 2.164 a proper error message is reported that the username is not valid

          Same problem here, Jenkins 2.150.2.

          Workaround was to use a username without a dot.

          Renato Chencinski added a comment - Same problem here, Jenkins 2.150.2. Workaround was to use a username without a dot.

          Daniel Beck added a comment -

          https://jenkins.io/security/advisory/2018-05-09/#SECURITY-786 explains the rationale behind the change, and provides a workaround if you need periods in your user names.

          The lack of form validation bug was fixed in JENKINS-52869, so closing this issue as a duplicate.

          Daniel Beck added a comment - https://jenkins.io/security/advisory/2018-05-09/#SECURITY-786 explains the rationale behind the change, and provides a workaround if you need periods in your user names. The lack of form validation bug was fixed in JENKINS-52869 , so closing this issue as a duplicate.

            Unassigned Unassigned
            jalle19 Foo Bar
            Votes:
            3 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: