Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Reset Jenkins user rights and password

Shulou Source: shulou.com Published: 2022-06-03 05:21:26 11月24日 Update

Description

Recently, when I was messing with jenkins, I clicked wrong when configuring user permissions. After selecting the security matrix, I did not add users, so I saved the configuration, and then I reported an error, indicating that there was no Overall/Read permission. There is another question: what if the user's password is forgotten?

I. reset user permissions

Solution:

Open the configuration file vim config.xml, which is located under the jenkins home directory. Delete the following code.

Truefalsefalse

Then restart the service

Service Jenkins restart

Log in directly and reconfigure user permissions

Two. Reset user password

The data of Jenkins proprietary users is stored in the JENKINS_HOME/users directory. Open the user folder that forgot your password and there is only one file config.xml in it.

Edit the vim config.xml to find the node, as shown in the figure:

# jbcrypt:$2a$10 $LxMm9HqAI/R4z7gL57qTouW/Mrz8uSaBpCGKvKc7K6dK.g/0yk/uq

Replace the contents of the node with the following, and note that there are no spaces before and after.

# jbcrypt:$2a$10 $LxMm9HqAI/R4z7gL57qTouW/Mrz8uSaBpCGKvKc7K6dK.g/0yk/uq

Save restart Jenkins program

Service Jenkins restart

Then log in again and enter the password 123456

Tags: Users configurations passwords permissions files contents directories nodes logins security code what to do data folders methods time points matrices programs spaces questions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Microsoft MySQL Linux Apple