Environment
- YB Anywhere - All versions
In order to reset the yb-anywhere superuser password, you need to update password_hash
column in users table in the yb-anywhere database.
Here are the steps you need to take:
- Login into the postgres container
- For YBA Installer systems:
/opt/yugabyte/software/active/pgsql/bin/psql -h localhost -U postgres -d yugaware
Note: the path to the psql binary may vary if the YBA software has been installed to a non-default location.
-
- For Replicated systems:
sudo docker exec -it postgres psql -U postgres -d yugaware
-
- For Kubernetes systems:
kubectl exec -it <yugaware_pod> -c postgres -n <namespace> -- psql -U postgres -d yugaware
Where <yugaware_pod> is the name of the yugaware pod and <namespace> is the Kubernetes namespace.
- Run the following SQL command. Please note you should replace [Superuser account email] with the right email address.
UPDATE users SET password_hash='$2a$10$.ve/rBZIvSTIo156A9WWiO6grkEMaTHbEa/RkqltrgpBvrf4bVfvK' WHERE email='[Superuser account email]';
Now you should be able to login entering Password123# as your password. Please change the password after you login on the User Profile page.
Additional information:
How to set a password of user’s choice using password_hash
?
In case you want to set the password_hash for a password which is not the default as mentioned above i.e Password123# , please follow the below steps:
- For the given user, let the new password be Passwordnewtry#123
- Go to the website: Bcrypt Encrypt - Bcrypt Hash Generator - Online - Browserling Web Developer Tools
- Enter the above mentioned password and set the rounds as 10.
- This will give you the password hash value for above chosen password
- Please use the steps mentioned above to login into the psql DB in postgres container and updated the correct pasword_hash.
Comments
0 comments
Please sign in to leave a comment.