Need Login Help

89 views
Skip to first unread message

Steve Burrus

unread,
Sep 6, 2018, 3:04:05 PM9/6/18
to jenkins...@googlegroups.com
I keep on disinstalling/reinstaling Jenkins because of my forgetting wh at my login information is. I have read  that my password is stored in a "secrets" file but I haven't been able to access it yet. Can someone help me with this?



  

Mark Waite

unread,
Sep 6, 2018, 5:55:02 PM9/6/18
to jenkins...@googlegroups.com

On Thu, Sep 6, 2018 at 1:04 PM Steve Burrus <sburr...@gmail.com> wrote:
I keep on disinstalling/reinstaling Jenkins because of my forgetting wh at my login information is. I have read  that my password is stored in a "secrets" file but I haven't been able to access it yet. Can someone help me with this?



  

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CABinwmWNORhXwDUEg1oE87-Bog4ZA6aCzfG3uzj3QjMJZKmSdw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Steve Burrus

unread,
Sep 6, 2018, 7:03:06 PM9/6/18
to jenkins...@googlegroups.com
I'm sorry but I can't find that config.xml file in my Windows 10 enterprise system. How exactly can I get to it?  I have ON the setting "Show Hidden Files and Folders".  
 

Mark Waite

unread,
Sep 6, 2018, 9:09:42 PM9/6/18
to jenkins...@googlegroups.com
It depends on how you are running Jenkins.

If you are running Jenkins from a command line using the war file, like:

    C:\Users\Mark\my-jenkins> java -jar jenkins.war

then the Jenkins HOME directory is placed in the ".jenkins" subdirectory of your home directory.  In my case, that means I have:

    C:\Users\Mark\.jenkins\config.xml

that contains the line '<useSecurity>true</useSecurity>'

If you are running Jenkins as configured with the MSI installer, then the file is:

    C:\Program Files (x86)\Jenkins\config.xml

If you've modified your installation by setting a value for JENKINS_HOME before starting Jenkins, then that is where it was placed.

If none of those match your installation, please describe in more detail how you have installed Jenkins on your Windows 10 machine.

Mark Waite

Steve Burrus

unread,
Sep 6, 2018, 9:59:31 PM9/6/18
to jenkins...@googlegroups.com
Mark here is what I have in my "C:\MyJenkins\jenkins.exe.config" file.Here is what I have inside the file :
<configuration>
  <runtime>
    <generatePublisherEvidence enabled="false"/> 
  </runtime>
  <startup>
    <supportedRuntime version="v4.0" />
    <supportedRuntime version="v2.0.50727" />
  </startup>
</configuration>
Now should I put that <useSecurity></useSecurity> line in THIS file, and if so where?  
  

Mark Waite

unread,
Sep 6, 2018, 10:55:24 PM9/6/18
to jenkins...@googlegroups.com
The file jenkins.exe.config controls the way Windows executes the program "jenkins.exe".  It does not store the global Jenkins configuration.

The global Jenkins configuration (including the <useSecurity> setting) is stored in a file named "config.xml".  The file that needs to be modified is not named "jenkins.exe.config", it is named "config.xml".  

If you search your file system (Windows search, or with a find command) for a file which contains the text "<useSecurity>true</useSecurity>" and is named "config.xml", that is the file.  A file of any other name won't do.  Adding the text to any other file won't do.

All the best!
Mark Waite


Steve Burrus

unread,
Sep 7, 2018, 11:16:10 AM9/7/18
to jenkins...@googlegroups.com
Mark I absolutely CANNOT FIND the config.xml file after looking all over for it. Any solutions?


Steve Burrus

unread,
Sep 7, 2018, 11:51:11 AM9/7/18
to jenkins...@googlegroups.com
Well now I not only FINALLY found htis config.xml file and edited the <useSecurity> line to change "true" to "false". But then when I went to the "localhost" website I STILL got the login area! Can someone pls help me?  

Slide

unread,
Sep 7, 2018, 11:55:29 AM9/7/18
to jenkins...@googlegroups.com
You need to restart the Jenkins service.

Steve Burrus

unread,
Sep 7, 2018, 12:06:08 PM9/7/18
to jenkins...@googlegroups.com
NOPE it  still didn't work. Even after re-starting the Jenkins service I STILL get the login area. I would appreciate your continuing help with this persistent problem.

Slide

unread,
Sep 7, 2018, 12:09:30 PM9/7/18
to jenkins...@googlegroups.com
Can you send a screenshot of the login area that you are seeing as well as attaching the config.xml file you found (after replacing any company or personal information) that you made the change to?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.

Steve Burrus

unread,
Sep 7, 2018, 12:41:07 PM9/7/18
to jenkins...@googlegroups.com
Okay "Slide" I have attached the Jenkins login area and below you will see this config.xml file :

<?xml version='1.1' encoding='UTF-8'?>
<hudson>
  <disabledAdministrativeMonitors/>
  <version>2.121.3</version>
  <installStateName>NEW</installStateName>
  <numExecutors>2</numExecutors>
  <mode>NORMAL</mode>
  <useSecurity>false</useSecurity>
  <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>-1</slaveAgentPort>
  <disabledAgentProtocols>
    <string>JNLP-connect</string>
    <string>JNLP2-connect</string>
  </disabledAgentProtocols>
  <label></label>
  <crumbIssuer class="hudson.security.csrf.DefaultCrumbIssuer">
    <excludeClientIPFromCrumb>false</excludeClientIPFromCrumb>
  </crumbIssuer>
  <nodeProperties/>
  <globalNodeProperties/>
</hudson> 

Jenkins.html

Slide

unread,
Sep 7, 2018, 12:50:57 PM9/7/18
to jenkins...@googlegroups.com
Ok, it looks like in current versions of Jenkins, you need to do a few more steps than just change useSecurity to false. Please take a look at this link (https://jenkins.io/doc/book/system-administration/security/#disabling-security) and follow the steps there. I recommend stopping the Jenkins service, editing the file and then starting it back up.

Steve Burrus

unread,
Sep 7, 2018, 1:05:53 PM9/7/18
to jenkins...@googlegroups.com
Boy Slide this problem is hanging on like a "tenacious bulldog". I did EVERYTHING you recommended that I do but I STILL got the login area. Do you feel like helping me some more?

                                                                
On Fri, Sep 7, 2018 at 11:50 AM Slide <slide...@gmail.com> wrote:
Ok, it looks like in current versions of Jenkins, you need to do a few more steps than just change useSecurity to false. Please take a look at this link (https://jenkins.io/doc/book/system-administration/security/#disabling-security) and follow the steps there. I recommend stopping the Jenkins service, editing the file and then starting it back up.

Slide

unread,
Sep 7, 2018, 1:32:12 PM9/7/18
to jenkins...@googlegroups.com
Can you resend your new config.xml?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.

Steve Burrus

unread,
Sep 7, 2018, 1:37:26 PM9/7/18
to jenkins...@googlegroups.com
Sure. Is there anytjhing else I should take out of it?

<?xml version='1.1' encoding='UTF-8'?>
<hudson>
  <disabledAdministrativeMonitors/>
  <version>2.121.3</version>
  <installStateName>NEW</installStateName>
  <numExecutors>2</numExecutors>
  <mode>NORMAL</mode>
  <useSecurity>false</useSecurity>
    <denyAnonymousReadAccess>true</denyAnonymousReadAccess>
  </authorizationStrategy>

Slide

unread,
Sep 7, 2018, 2:00:43 PM9/7/18
to jenkins...@googlegroups.com
I think you need <authorizationStrategy/>, not </authorizationStrategy>  (the slash should be at the end).

Mark Waite

unread,
Sep 7, 2018, 2:38:26 PM9/7/18
to jenkins...@googlegroups.com
Your search tool may be refusing to index the location where the file is stored.  Try a different search technique.

Try the following from an Administrator Windows Command Prompt:

C:\> FINDSTR /L useSecurity "%ProgramFiles(x86)%"

If that doesn't work, you could try installing some other program that will search for strings or file names on your disc.

If you have multiple drives (C:, D:, etc.), you might check to see if Jenkins was installed on one of the other drives.

The https://www.howtogeek.com/99406/how-to-search-for-text-inside-of-any-file-using-windows-search/ page suggests that Windows search might be choosing to not index the xml configuration files.  If so, then it gives hints that may help you change that setting.

Mark Waite

Reply all
Reply to author
Forward
0 new messages