Reputation: 12782
I just installed Jenkins in my machine running Ubuntu.
But when I access http://localhost:8080/ jenkins asks me for my username and password... but I have no idea what they are!
How can I log in Jenkins? (Sorry for the noob question, first time using Jenkins)
Any help is welcome!
Edit: So far I got this:
I can remove security by changing the config.xml setting
<useSecurity>true</useSecurity>
to
<useSecurity>false</useSecurity>
And now I can access my Jenkins... But I still dont know how to create a user =/
Upvotes: 33
Views: 142324
Reputation: 4038
This LINK has detailed steps on how to create Jenkins user. Here is the summary:
After setting
<useSecurity>false</useSecurity>
Restart Jenkins:
sudo systemctl restart jenkins
Upvotes: 1
Reputation: 533
Steps to create a new user
Upvotes: 1
Reputation: 1054
Login to your Jenkins server via web URL. (http://jenkins_ip or jenkins_url:8080) Jenkins >> Manage Jenkins >> Manage Users >> Create User >> Provide the username, password, email & click on Create User.
To edit or reset or modify the password of the Jenkins' own user database users, Jenkins >> Manage Jenkins >> Manage Users >> Click the user-id from the existing user list >> Configure >> Save
Upvotes: 2
Reputation: 145
Once you log in Jenkins as admin, Manage Jenkins > Configure Global Security and select the "Enable Security" check box. select "Jenkins Own User Database" for the security realm under access control and then select "Logged in Users can do anything" under Authorization and Save it.
click on Manage jenkins>>Manage User >> Create User Complete the details.
Upvotes: 12
Reputation: 57
By default Jenkins uses it's own database for user management.
Go to People on Jenkins dashboard to see Users that you have, if you are not able to find an option to add user there, don't be disheartened, read on.
Go to Manage Jenkins and scroll down to bottom, second last option should be Manage Users.
By default every logged-in user can do anything, to change this, go to Manage Jenkins -> Configure Global Security -> Access Control -> Authorization -> Matrix-based security
AT THIS POINT IF YOU DON'T KNOW WHAT TO DO, PLEASE DON'T MAKE ANY CHANGES. DON'T SAVE OR APPLY.
Upvotes: 0
Reputation: 166389
Jenkins asks me for my username and password... but I have no idea what they are!
It depends how you configured Jenkins Access Control/Security Realm in your Configure Global Security page which determines the user authentication method, whether to use Jenkins own independent user database or external database (such as LDAP, Active Directory, Unix NIS, etc.).
If its using its own database, you can try to decrypt Jenkins passwords from credentials.xml
. Otherwise disable useSecurity
in your config.xml
file, restart Jenkins and follow the steps. You should be asked to provide the initial password from the initialAdminPassword
file (if you don't, make sure you've changed the right file and restarted Jenkins correctly).
To create user, you need to go to select your authentication method in Configure Global Security and create user either externally or if you've selected Jenkins’ own user database and tick Allow users to sign up, then hit Save button which would allow you to create user from the Jenkins interface.
Upvotes: 3
Reputation: 1330
in jenkins go to Manage Jenkins > Configure Global Security and select the "Enable Security" check box. select "Jenkins Own User Database" for the security realm and then select "Logged in Users can do anything" or a matrix based strategy (If you have multiple users with different permissions) for the Authorization.
Upvotes: 26
Reputation: 4475
You should find a file in secrets folder called initialAdminPassword with the info
Upvotes: 1