Add Users to Jenkins with "Allow users to sign up" Disabled

JenkinsUser Management

Jenkins Problem Overview


I do not want new users to be able to sign up. So in Jenkin's Configuration, I disabled "Allow users to sign up" with using Jenkin's own user database.

But how can I manually add users now? Also, is there a default admin user I should take care of?

Jenkins Solutions


Solution 1 - Jenkins

There is "Create Users" in "Manage Jenkins".

Solution 2 - Jenkins

In case "Allow users to sign up" was already disabled and security turned on and there is no user you can use to login the only way to go is to change Jenkins configuration manually on the server and restart server.

Thing to change is in Jenkins Home folder i config.xml file. change

<useSecurity>true</useSecurity>

to

<useSecurity>false</useSecurity>

restart and refresh browser

Voila!!!

Solution 3 - Jenkins

Manage Jenkins -> Jenkins own user database, Anyone can do anything. Then you are not forced to login or signup. Manage Jenkins -> Manage Users and you create your users, then setup security accordingly.

If you don't setup the security method first there is no way to add users.

A convenient way for configuring Jenkins is to edit the config.xml file directly and use the Manage Jenkins -> Reload configuration from Disk hyperlink instead of restarting the service.

Solution 4 - Jenkins

The recommended way to handle this is to use matrix based security and leave sign up on. Set default permissions to nothing, this way when people sign up they can't actually do anything until you explicitly grant them permissions. If you don't want to leave the sign up on for some reason, you will have to enable to add users and then disable when you are done. As far as I know there is no way to add a user with sign up turned off unless you want to hand edit the config files.

There is no default admin user, you will want to make sure you add yourself with max permissions or you risk getting locked out when you enable security.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionfabbView Question on Stackoverflow
Solution 1 - JenkinsfabbView Answer on Stackoverflow
Solution 2 - JenkinsMichal KView Answer on Stackoverflow
Solution 3 - JenkinsvezenkovView Answer on Stackoverflow
Solution 4 - JenkinsCIGuyView Answer on Stackoverflow