How To Remove The Password For Jenkins Using CLI

Follow the steps mentione below to remove the jenkins password.

Step 1: Go to the following path where you can find the folder called config.xml

cd  /var/jenkins_home

Step 2: Type ls in the below you can find the multiple file in that file you need to edit the following file

“config.xml”

<?xml version='1.1' encoding='UTF-8'?>
<hudson>
<disabledAdministrativeMonitors/>
<version>2.447</version>
<numExecutors>2</numExecutors>
<mode>NORMAL</mode>
<useSecurity>true</useSecurity> (Chnage This To false)
<authorizationStrategy class="hudson.security.FullControlOnceLoggedInAuthorizationStrategy">
<denyAnonymousReadAccess>true</denyAnonymousReadAccess>
</authorizationStrategy>
<securityRealm class="hudson.security.HudsonPrivateSecurityRealm">
<disableSignup>true</disableSignup>
<enableCaptcha>false</enableCaptcha>
</securityRealm>
<disableRememberMe>false</disableRememberMe>
<projectNamingStrategy class="jenkins.model.ProjectNamingStrategy$DefaultProjectNamingStrategy"/>
<workspaceDir>${JENKINS_HOME}/workspace/${ITEM_FULL_NAME}</workspaceDir>
<buildsDir>${ITEM_ROOTDIR}/builds</buildsDir>
<jdks/>
<viewsTabBar class="hudson.views.DefaultViewsTabBar"/>
<myViewsTabBar class="hudson.views.DefaultMyViewsTabBar"/>
<clouds/>
<scmCheckoutRetryCount>0</scmCheckoutRetryCount>
<views>
<hudson.model.AllView>
<owner class="hudson" reference="../../.."/>
<name>all</name>
<filterExecutors>false</filterExecutors>
<filterQueue>false</filterQueue>
<properties class="hudson.model.View$PropertyList"/>
</hudson.model.AllView>
</views>
<primaryView>all</primaryView>
<slaveAgentPort>50000</slaveAgentPort>
<label></label>
<crumbIssuer class="hudson.security.csrf.DefaultCrumbIssuer">
<excludeClientIPFromCrumb>false</excludeClientIPFromCrumb>
</crumbIssuer>
<nodeProperties/>
<globalNodeProperties/>
<nodeRenameMigrationNeeded>false</nodeRenameMigrationNeeded>

The above content will be there in the config.xml file in that you need to change the following lines as follows.

Before

<useSecurity>true</useSecurity>

After

<useSecurity>false</useSecurity>

by making it it will remove the password for the jenkins. By which you can aceses the jenkins with out any password.

What Is The Default Jenkins Password?

Jenkins is a widely used open-source automation server that is essential to pipelines for continuous integration and delivery (CI/CD). Users frequently find that they must initially log in while installing Jenkins for the first time. This post explores the default Jenkins password and walks readers through the steps to get it and properly secure their Jenkins installation. Gaining an understanding of this password is essential to utilizing Jenkins’s capabilities for effective software development processes.

Similar Reads

What is Jenkins?

Jenkins is an open-source tool used for automating continuous integration and continuous delivery (CI/CD) like...

What is the default path for the Jenkins default password?

When you have installed Jenkins on the servers automatically, it is well protected with a password To get that password, the default path will be as follows:...

How To Set Customize Jenkins Password

After coping the path and paste it in the jenkins server you will get the password copy that password and paste it in here in the adminstrator password then it will take you to the next step....

How To Remove The Password For Jenkins Using CLI

Follow the steps mentione below to remove the jenkins password....

Jenkins Security Best Practices

1. Never use default credentials...

Conclusion

In this article we have seen what is the jenkins default path for password and how to aceses that password with the cli and how remove the password or reset the password when you forget the password....

Default Jenkins password – FAQ’s

How do I find my Jenkins admin password?...