Unlock Jenkins - how to
Try accessing the file using sudo:
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
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.
On the terminal, where you have connected to the Ubuntu EC2 instance, view the content of the file using the command sudo cat <path copied from the jenkins page>
. It will show the default administrator password. You can copy and use this password in the GUI (browser) to log in first time.