Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a user in jenkins?

Tags:

jenkins

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 =/

like image 958
Leandro Borges Ferreira Avatar asked Nov 29 '16 22:11

Leandro Borges Ferreira


People also ask

Can we create multiple users in Jenkins?

By default, when you create a user in Jenkins, it can access almost everything. In this, you can create multiple users but can only assign the same global roles and privileges to them.

How do I add a user to Jenkins API?

You're right, there is no explicit CLI command for adding a user. But you could use groovy script for this (using the CLI for execution). This shell command will create a new user with login "user1" and password "password123".

How can I see users in Jenkins?

If you have access to the gui, you can go to "manage jenkins" > "system information" and look for "user.name".

How do I give access to Jenkins folder?

Allow admin users access to the full folder structureNavigate to Groups->New Group from the root Jenkins dashboard. Name the group admin-group-int and click OK to create a group internal to Jenkins for role assignment. Check the Granted checkbox for the admin role, leave Propagates checked, and click Save .


2 Answers

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.

like image 133
Inforedaster Avatar answered Sep 23 '22 22:09

Inforedaster


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.

like image 42
Kanav Avatar answered Sep 22 '22 22:09

Kanav