windowsjenkins

How to reset the user/password of Jenkins on Windows?


Maybe a fool question, I installed jenkins on windows by default, have set no user/password, it worked at first, no need to login. But when launch the 8080 webpage now, it hangs the login page, I've tried some normal user/password combinations, none could pass. Also searched the resolution on website, only find some about linux, no about windows, so need help. jenkins login page


Solution

  • You can try to re-set your Jenkins security:

    1. Stop the Jenkins service
    2. Open the config.xml with a text editor (i.e notepad++), maybe be in C:\jenkins\config.xml (could backup it also).
    3. Find this <useSecurity>true</useSecurity> and change it to <useSecurity>false</useSecurity>
    4. Start Jenkins service

    You might create an admin user and enable security again.

    Note: On more recent Jenkins versions running on Windows the config.xml file is found here: C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins\.jenkins\