# How to Reset Your Jenkins Admin Password: A Step-by-Step Guide

Hey Jenkins Users!

Ever found yourself locked out of your Jenkins admin account and scratching your head on how to regain access? Don't worry; we've got you covered! In this quick guide, we'll walk you through the steps to reset your Jenkins admin password seamlessly.

**Step 1: Stop Jenkins** The first step is to halt Jenkins to ensure a smooth password reset process. You can do this by executing the following command:

```plaintext
sudo systemctl stop jenkins
```

**Step 2: Edit** `config.xml` Next, you need to modify the Jenkins configuration file. Open it using your favorite text editor (in this example, we'll use `nano`):

```plaintext
sudo nano /var/lib/jenkins/config.xml
```

**Step 3: Enable Signup** Within the `config.xml` file, locate the `<disableSignup>` tag and change its value from `true` to `false`. This step enables user registration, which is necessary to create a new user and reset the admin password.

**Step 4: Start Jenkins** Now that you've made the necessary changes, it's time to start Jenkins again:

```plaintext
sudo systemctl start jenkins
```

**Step 5: Register a New User and Reset Password** With Jenkins up and running, navigate to the Jenkins login page and register a new user account. Once registered, log in with the newly created account and proceed to reset the admin password through the Jenkins interface.

**Step 6: Revert Changes** After successfully resetting the admin password, it's essential to revert the changes made to the `config.xml` file to maintain security. Repeat steps 1 and 2 to stop Jenkins and open the configuration file for editing. Then, set the `<disableSignup>` tag back to `true`. Finally, start Jenkins again to apply the changes:

```plaintext
sudo systemctl stop jenkins
sudo nano /var/lib/jenkins/config.xml
sudo systemctl start jenkins
```

And there you have it! Your Jenkins admin password is reset, and your system is secure once again. If you encounter any issues or need further assistance, feel free to reach out. We're here to help!

Happy Jenkins-ing! 😊
