Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 1000
Gabriel XU Avatar asked Sep 06 '16 03:09

Gabriel XU


People also ask

How do I find my Jenkins password on Windows?

Unlocking JenkinsThe initial Administrator password should be found under the Jenkins installation path (set at Step 2 in Jenkins Installation). For default installation location to C:\Program Files\Jenkins, a file called initialAdminPassword can be found under C:\Program Files\Jenkins\secrets.

How do I know my Jenkins password?

The Jenkins default password is stored in the $JENKINS_HOME/secrets/initialAdminPassword file (the exact location of the Jenkins default password is indicated in the Jenkins console log).


2 Answers

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\

like image 165
Tuan Avatar answered Sep 25 '22 02:09

Tuan


Read Initial password :

C:\Program Files(x86)\Jenkins\secrets\initialAdminPassword 

Default username is 'admin' and the password is the one from initialAdminPassword when you follow the above path.

'Manage Jenkins' --> 'Manage Users' --> Password 

Then logout and login to make sure new password works.

like image 29
user8225463 Avatar answered Sep 21 '22 02:09

user8225463