'Jenkins no initialAdminPassword: No such file or directory

When i do

# cat /var/lib/jenkins/secrets/initialAdminPassword
cat: /var/lib/jenkins/secrets/initialAdminPassword: No such file or directory
  • I have created a test user
  • In users folder only the test user is there i dont see any admin user is there
  • also I am not able to create users with test user beacuase of no admin privilege

how can i get admin password



Solution 1:[1]

$ docker exec cat var/jenkins_home/secrets/initialAdminPassword

remove the slash before 'var' and it will work fine

Solution 2:[2]

cat /var/lib/jenkins/secrets/initialAdminPassword

cat: /var/lib/jenkins/secrets/initialAdminPassword: No such file or directory

Is used for finding the initial password of admin start the Jenkins navigate to /var/lib/Jenkins/ find it over there

or

You have to start your Jenkins server and then execute

sudo more /var/log/jenkins.log

Solution 3:[3]

if you are using Ubuntu switch to root user "sudo su"

then try to see the content of the file.

I tried that running ubuntu on EC2 instance. good luck

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Aakizone
Solution 3 delafuent3