I forgot the user credentials.Tried to follow the links on SO but I am not able to find the file paths.Links are mentioned below.How to reset the credentials on mac OS Sierra?
4 Answers
For macOS, the config.xml file is located in:
/Users/<USERNAME>/.jenkins
As the other post says, change:
<useSecurity>true</useSecurity>
to
<useSecurity>false</useSecurity>

- 151
- 2
- 7
-
3For MacOS Sierra 10.12.6 path would be /Users/Shared/Jenkins/Home/config.xml – Pratik Patel Apr 19 '18 at 12:16
Run the following command to find the Jenkins username and encrypted password
cat /Users/{USERNAME}/.jenkins/credentials.xml
if you want to reset the password please follow the below steps
1.Use command – $ vim /Users/{USERNAME}/.jenkins/config.xml
file.
2.Go to <useSecurity>
tag and check value, it will be true
.
- Press
i
so it file will be in insert mode. Then you can update the file. You need to update<useSecurity>
tag value tofalse
as below.
4.Save this file and exit from file. Press Escape
and then enter :wq
– to save updated file )
5.Once you are done with updating value in config.xml file. Restart Jenkins service. Use command ( $ brew services Restart Jenkins
)
6.Now open Jenkins URL. It will go to dashboard direct. No any credentials required. You can see after opening dashboard ‘Logged in user’ section will be blank. As it is now Anonymous user.
7.Now, Delete old admin users. To do that go to People option in left hand side bar.

- 906
- 7
- 23

- 71
- 1
- 2
-
I probably wouldn't recommend using Vim to anyone not already using it. Users on SO should already know how to edit a text file, so simply saying edit `thisFile.txt` will suffice. :-) – silicontrip Mar 03 '21 at 10:25
You need to set the <useSecurity>true</useSecurity>
to <useSecurity>false</useSecurity>
to login without user name and password
Steps:
cd /Users/<USERNAME>/.jenkins
nano config.xml
Change <useSecurity>true</useSecurity>
to <useSecurity>false</useSecurity>
Restart Jenkins brew services restart jenkins-lts
Then you can login and reset your username and password

- 339
- 4
- 13