17

I have recently installed Jenkins on private server. Now when I have rebooted the server, it is asking for username and password. But, I have not given any such credentials. I have turned disable signup to false from true, but I am not able to restart my Jenkins as it is showing service not recognized.

muru
  • 193,181
  • 53
  • 473
  • 722
Niharika Gupta
  • 171
  • 1
  • 1
  • 4

3 Answers3

17

If you have not set jenkins initial credential then it will be

  • username: admin
  • password: Go to your .jenkins/secrets/initialAdminPassword for password.
muru
  • 193,181
  • 53
  • 473
  • 722
Suman Lama
  • 171
  • 3
  • 2
    i could not find secrets folder in .jenkins – Akshay Vijay Jain Nov 16 '17 at 13:29
  • Note in my install of windows it is under my install folder %JENKINS_HOME%\secrets\initialAdminPassword. Note also that initially this wasn't created because I had another service running on port 8080 so Jenkins failed to start. I had to change the port in the jenkins.xml for Jenkins to start properly and create the secrets folder. – user313070 Nov 06 '18 at 16:58
6

If you use Ubuntu, you can find initialAdminPassword using sudo cat /var/lib/jenkins/secrets/initialAdminPassword

MRWBSN
  • 61
  • 1
  • 1
1

For all of you (like me) with jenkins.war under:

/var/lib/jenkins/

but not:

/var/lib/jenkins/secrets/initialAdminPassword

You have to start your jenkins server and then execute

sudo more /var/log/jenkins.log

you will see something like

*************************************************************
*************************************************************
*************************************************************

Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:

64876418716348764921649873214

That's your password for user 'admin'.