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.