13

I tried using Jenkins or my admin username as user and password. For password, I tried to update using sudo passwd jenkins, so I am fine on that. However, I am skeptical about the user name. How do I confirm the username for Jenkins? Can someone pls help me?

Sae1962
  • 1,122
  • 15
  • 31
Ashvitha
  • 5,836
  • 6
  • 18
  • 18
  • Possible duplicate of [What is the default Jenkins password?](http://stackoverflow.com/questions/15227305/what-is-the-default-jenkins-password) – HParker Nov 13 '16 at 03:16
  • no my question is i want to know my user name not password. – Ashvitha Nov 13 '16 at 03:19

3 Answers3

22

During the initial run of Jenkins a security token is generated and printed in the console log. The username is admin

The token should look something like,

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

Jenkins initial setup is required. A security token is required to proceed.
Please use the following security token to proceed to installation:

41d2b60b0e4cb5bf2025d33b21cb

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

For me the initial admin password was in a log at ~/.jenkins/secrets/initialAdminPassword

after installing with homebrew.

source

HParker
  • 1,567
  • 15
  • 19
  • Thanks! but I have installed via homebrew and I dont thnk I have come across the above. I tried with username admin and it still doesnt work. – Ashvitha Nov 13 '16 at 03:34
  • I updated my answer with the location the log should be at when installed with homebrew. – HParker Nov 13 '16 at 03:49
  • Ah thats the problem I am facing. I am unable to find the intialAdminPassword in my secrets folder. http://stackoverflow.com/questions/40568381/installed-jenkins-2-19-2-pkg-and-it-says-to-enter-initialadminpassword-from-the – Ashvitha Nov 13 '16 at 03:51
  • I just noticed, there is a secret key which i just dragged and dropped into my browser and I got something like 51e84abf59589daf8f553dc2dca09559144ef08e648eb4724e5b19b04573efd2 but this doesn't seem to work as well. – Ashvitha Nov 13 '16 at 03:59
  • 1
    I got it resolved. I was trying to access through my admin account which i now realized that I have to login as the jenkins user. haha – Ashvitha Nov 13 '16 at 05:01
  • 1
    Good Glad you figured it out! – HParker Nov 13 '16 at 05:20
4

If you pod is running in a Kubernetes cluster, just look at the running process … Your initial password will be shown…

e.g.

--argumentsRealm.passwd.admin=**3kJQtPDkhk** --argumentsRealm.roles.admin=admin
Sae1962
  • 1,122
  • 15
  • 31
cclark
  • 41
  • 1
3

Username: admin

For password,

cat /Users/$(whoami)/.jenkins/secrets/initialAdminPassword

you will get similar to this token 2762710d8dab4c88a59fea0a2e559069

Prashanth Sams
  • 19,677
  • 20
  • 102
  • 125
  • If you are running a Docker Jenkins instalation, then you will need to get inside the container so you can retrieve that password with something like: `docker exec -it /bin/bash` and then search it in `var/jenkins_home` or wherever you have jenkins_home configured <3 – sujumayas Jul 01 '19 at 11:09