How to change Gerrit LDAP administrator - gerrit

I have one Gerrit server deployed. My Gerrit server was configured with one LDAP administrator user. Due to some cleanup activity that LDAP user was deleted by LDAP admin. And now I got the new LDAP user. I replaced the user configuration where the last user was configured in secure.config file. And then changed the user at Jenkins as well. And review are going on fine.
After I made the changes in secure.config file with the new user. I was in assumption that this user will become the next administrator of Gerrit. But I can see it is not. And using the old user I am not able to login. Now Hoe can I make the new user as Gerrit admin?
Changed the setting and reverted back, and login again with the new user but no luck.
[auth]
type = development_become_any_account
Used Gerrit version: (2.11.8)

You need to add the new LDAP user to the "Administrators" group.
See more details at the Gerrit documentation here.

Related

How do I enable Jenkins admin user when using Active Directory login

I have recently switched to using AD login on my Jenkins instance but I notice Jenkins has restricted the functionalities I can access including the Manage Jenkins view:
I can no longer login with the admin user after this re-configuration since it returns incorrect password from the Active Directory.
Did I miss something else in configuring AD authentication ?
If so what because the guide I followed was straight-forward and has no mention of using the built-in database users. I am not sure either if my permissions will be linked to my AD group ( my AD user is not in Admin group).
I am also not sure on whether Jenkins continues supporting login with the admin user after you have enabled AD authentication.
So this will come down to you Authorization Plugin and what you have setup there.
If you are using the Role Based Strategy and haven't granted your user Admin permissions then it is correct for you have not got them.
When setting up the Active Directory Plugin in the Advanced menu there is an option for Use Jenkins Internal Database which allows
This option allows to fallback into the Jenkins Internal User Database for the specific user selected (ONLY ONE USER).
You could select this option and set your built in user (or admin) as the fallback.
If you are currently totally locked out you can edit the config.xml and set <useSecurity> to false and restart the Jenkins process which will remove the Active Directory config

How do I fix a mismatched user SID in TFS 2013?

TFSConfig Identities listed all TFS accounts and all but one matched Windows.
How do I fix the lone user account where the Match is False?
While this may not be relevant, I add it to the post in case it provides any additional clues. I tried to reapply the user in the Application Tier Console Users list and it failed. The log stated the account is also an orphaned SQL Server Login. I assume that makes sense if the SID is mismatched, though.
Since you have reapply the user in the Application Tire Console Users list. Changes you make to local or Active Directory groups do not get reflected in TFS immediately.
It may be a identity synchronization issue. You must wait for the next identity synchronization with Windows before the properties of accounts that you do some account change will be updated. This requirement includes changes from group to user, user to group, and domain account to local account.
You could also force TFS to sync, details please refer this blog. After this run the TFSConfig Identities again.

How to setup authentication on jenkins

I installed jenkins on a CentOS system. Now I am able to open the jenkins web page on localhost:8080. I want to add a login required for accessing this url. I enabled security on 'Configure Global Security' page then set 'Unix user/group database' under 'Security Realm'. In Authorization part, I set 'Logged-in users can do anything'. By doing this configuration, only logged in user can do build and modification on jobs. But there is a problem that users can still read all the jobs information without log in. How can I prevent anonymous users to access my jenkins web page?
Using the "Matrix based security" helps you here. And then uncheck all the checkboxes from the Anonymous user.
Under the "Jenkins’ own user database" also uncheck the "Allow users to sign up" sign up option. This way you can prevent unwanted users.
Good luck!

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

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?
There is "Create Users" in "Manage 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!!!
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.
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.

Change logged in user

When I setup TFS for the first time, I usually use the TFSSetup account, and with this account going to login for the first time.
How to login as a different user?
How to check who the current user is?
Checkout a file in Source Control Explorer and user column it will show your username with which you are connected to TFS.
If you want to connect TFS using other credentials, then add the address of your TFS server and the credentials in Credentials Manager(Control Panel->User Accounts->Credential Manager). The next time you try to access TFS, these credentials will be used.
Clear the user's credentials in the Credential Manager. This will then bring back the Authentication Window when trying to connect to TFS.
Another approach you can take that worked for me, was to log into the web interface for TFS, then use that to log in as another user. So, navigate to:
http://yourtfshost:8080/collection/web/ (or whatever your web address is)..
Then, click on your name in the corner and select "sign in as a different user."
Essentially, this does the same thing as the above suggestions. It simply replaces your credentials in credential manager with the correct ones.

Resources