unable to log in to Gerrit - "name already in use" - gerrit

A user who hasn't logged in to our Gerrit 2.10 instance for a few months tried to log in yesterday and got a "Forbidden" error. In the logs I see this:
[2022-05-05 11:09:47,829] ERROR com.google.gerrit.server.account.AccountManager : Cannot assign user name "redacted" to account 1000064; name already in use.
[2022-05-05 11:09:47,836] ERROR com.google.gerrit.httpd.auth.container.HttpLoginServlet : Unable to authenticate user "redacted"
com.google.gerrit.server.account.AccountUserNameException: Cannot assign user name "redacted" to account 1000064; name already in use.
It appears that he tried to re-register (more than once, in fact), which created a new user ID that no longer matches his user name. As a Gerrit admin, is there some way that I can view the user IDs and remove the ones that are bogus?
I just tried running this command, but it failed:
user#desktop=> ssh -p 29418 admin#gerrit.whoi.edu gerrit set-account --delete-external-id 1000060 redacted
fatal: "--delete-external-id" is not a valid option

Related

Error while trying to assign a custom role "Secret Reader" to an object ID for an Azure Key Vault

Can anyone tell me why i am getting this error while trying to run this command and assign a custom role "Secret Reader" to a guest account Object Id :
az role assignment create --role "Secret Reader" --assignee-object-id "12526c57-c91b-405b-9068-2b582b23e83a" --scope "/subscriptions/Not-putting this-here/resourceGroups/pallabdev/providers/Microsoft.KeyVault/vaults/testhalvault"
The error i get is :
request failed: Error occurred in request., InvalidSchema: No connection adapters were found for 'C:/Program Files/Git/subscriptions/Not-Putting-This-Here/resourceGroups/pallabdev/providers/Microsoft.KeyVault/vaults/testhalvault/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Secret%20Reader%27&api-version=2018-01-01-preview'
From the error message, I suppose you ran the command in Git Bash of Windows, I can also reproduce this on my side, it was caused by the Auto-translation of Resource IDs in Git Bash, similar issue here.
To solve this issue, just set environment variable MSYS_NO_PATHCONV=1 or set it temporarily when you running the command.
$ MSYS_NO_PATHCONV=1 az role assignment create --role "Secret Reader" --assignee-object-id "12526c57-c91b-405b-9068-2b582b23e83a" --scope "/subscriptions/Not-putting this-here/resourceGroups/pallabdev/providers/Microsoft.KeyVault/vaults/testhalvault"
I had the same problem and I simply ran the command using the Windows powershell instead of Gitbash and it worked like a charm.

Influxdb 2: Cannot sign in

I've managed to install influxdb2 and login to the web ui at localhost:8086 with the default username/pass admin/admin. But when I try to login now with the same credentials i get an error saying "Could not sign in" as shown here: Running systemctl status influxdb gives me this output: This persists after reboots and reinstalls of influxdb. Is there some way to hard reset the password or to disable the authentification?
You can reset your InfluxDB 2 administrator password by recovering a admin token if you have access to the installation filesystem.
Find influxd.bolt on the host or in the container: /var/lib/influxdb2/influxd.bolt
Search this mixed text and binary json file for strings like your known username or token.
cat /var/lib/influxdb2/influxd.bolt | strings | grep "admin's Token"
{"id":"1234567898000000",
"token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==",
"status":"active",
"description":"admin's Token",
With an admin-privileged token, you can update the password with the Influx Command Line Interface (CLI) command influx user password. For example:
$ docker exec -it 85e4df16a429 influx user password -n admin -t xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==
? Please type your new password *********************
? Please type your new password again *********************
Your password has been successfully updated.
$
It happened the same to me, I created a user and then I forgot the password.
For those who work in Windows, go to C:\Users\YourName and delete .influxdbv2.
I forgot i created a new user, organization and bucket when first running influxdb.
I've managed to solve it by purging all the influxdb files by running dpkg --purge influxdb2 and then reinstalling.

Admin credentials doesn't work in datopian installation of ckan?

I have been installing ckan with docker from the page of datopian-tech. The problem I have is in the last part of section "getting started": When I use the credentials given ckan says that are bad credentials.
You can always create a new account and give it admin rights. After you create a new account use this command to promote it to admin. Note that paster command is removed in CKAN2.9 so you will need to check this guide.

Sourcetree cannot push to bitbucket repo due to authentication issue

This may seem like a bit of a rudimentary issue, but I cannot seem to push from Sourcetree (windows) to a bitbucket repo for which my user is the owner.
To clarify I can log in to the repo using my browser just fine but when I push to it from Sourcetree and I enter the same details into the prompt box it fails to authenticate. I have tried using the username and email, I've even changed the password of the account but still no joy.
I also created an app password and tried using that as the password with combinations of the username and email, but no joy.
the error I am getting is:
git -c diff.mnemonicprefix=false -c core.quotepath=false
--no-optional-locks -c credential.helper= -c credential.helper="C:/Users//AppData/Local/ATLASS~1/SOURCE~1/GIT_EX~1/GIT-CR~1.EXE"
push -v --tags origin master:master fatal: HttpRequestException
encountered. An error occurred while sending the request.
remote: Invalid username or password. If your organization manages
your account or you've enabled two-step verification, create an app
password to log in: https://confluence.atlassian.com/x/9DJmMQ fatal:
Authentication failed for
'https://#bitbucket.org//.git/'
Pushing to https://#bitbucket.org//.git Completed
with errors, see above.
Any advice would be greatly appreciated
Try to add a new SSH key via Sourcetree, seems like Sourcetree is not picking up your username and password when you are using HTTP/S authentication, it can be because:
You have not added your account info in git global
You have not properly assigned credentials
Using SSH is a far preferred way:
https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html#SetupanSSHkey-ssh3
I deleted:
C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree\passwd
C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree\accounts.json
Inspired by this article: https://community.atlassian.com/t5/Sourcetree-questions/Getting-quot-fatal-Authentication-failed-for-quot-error/qaq-p/624663
It worked. When I restarted SourceTree it acted like it was the first time it was opened (downloaded some tools, asked me for my credentials). Once it finished, my project tabs were there, and I was able to pull/push.
Perform below steps:
Reset your password : https://id.atlassian.com/manage/change-password
Run below command from working copy
git remote set-url origin Your-repository-url-here
In order to get it worked I ended up going to Tools -> Options -> SSH Client configuration and changing it to OpenSSH. and set the path to the already generated ssh key file like C:\Users<user>.ssh\id_rsa.

PSEXEC - Elevated Command prompt

Sorry if this has been asked a hundred times, I'm sure it might have been, but my searching skills don't seem to be finding the answer to my particular question today :(
I'm trying to execute a command on a server, from a domain user account, who has all the correct rights to perform the given action. I know this because if I login to the server under the admin account and then open the command prompt using 'Run as different User', specifying the login details of the domain user account, I can perform the relevant section of the below command successfully.
However, when I try running ("c:\NaviTest\psexec.exe" "\HOSTNAME" "c:\path to\server-command.exe" "arguments") from a command prompt on their host computer I get the 'Access Denied' message back.
If I launch the command prompt as administrator and change the syntax of the command as follows (where username is the logged in user and password is their password);
"c:\NaviTest\psexec.exe" -u username -p password "\\HOSTNAME" "c:\path to\server-command.exe" "arguments"
All works.
I know from this that its not running 'server-command.exe' the command that is causing the issue, its getting the connection to server using PSEXEC which seems to be failing unless the command prompt is being run in Elevated mode.
My question (as I haven't actually asked on yet!), is can PSEXEC work from the command prompt without having to be run administratively?
I'm trying to execute this as part of a much larger script, if I can't make it work without administrative privileges its not going to work.
Found the answer to this.......
https://serverfault.com/questions/280482/how-to-use-psexec-without-admin-privileges-on-target-machine
Basically, the user account executing the PSEXEC command needs local administrative rights on the destination host.
Adam
This might cause due to prevailing issue.
psexcec will start a service(windows) in end point .
check this
Run this as admin and will proceed without issues

Resources