I have installed jenkins on my ec2 instance using putty, from my windows system
When I try to access jenkins through web, I get the Unlock Jenkins using /var/lib/jenkins/secrets/initialAdminPassword
enter image description here
How to get to this location as if accessing through putty, I get permission denied to this folder.
Please advise, I am new to ubuntu and jenkins
My solution is similar to the one by Mark B, I viewed the secrets by executing the cat command on the initialAdminPassword file.
However, I was not able to use cat to view the password until I gave my user permission.
Initially jenkins was the only user that had permissions to do anything with the secrets folder. I tried logging into the jenkins user account but could not. I executed:
sudo chmod a+rwx ./secrets
to give myself permission to view that directory.
As some background information, it might seem weird that I would give myself permission to "execute" a directory, but that is necessary in order to view its in the terminal using ls.
Also, my account is an admin account. I am running MacOS 10.11.4. Hope that helps.
Try accessing the file using sudo:
sudo cat /var/lib/jenkins/secrets/initialAdminPassword