Skip to content

How to reset your password for secure wallet v0.18.13

manikanta472 edited this page Jan 23, 2022 · 1 revision

This tutorial applies to the below scenario you may find yourself in:

You have the public key AND private key for your account, but you forget the password for that account.

1. Go to your node folder

cd $OLDATA

2. Backup old Key file

In your node folder you will find a directory named keystore. Backup this folder first. This is a very IMPORTANT step

3. Delete old Key file

Go into keystore folder and delete the file that is related to the account you want reset password.

For example, if your account address is 0lt1234536976ea8b19cff97ddbe286511a690dbcbf, you should delete the file with a name similar to this: "OL_2020-10-15T10:11:30.748412467EDT_0lt1234536976ea8b19cff97ddbe286511a690dbcbf"

4. Create a new Key file

update or create an account

If your Fullnode is running in GCP image or Docker, please add sudo before olclient in this tutorial

Usage:

olclient account add [flags]

Flags:

  --chain string          Specify the chain (default "OneLedger")
  -h, --help              help for add
  --name string           Account Name
  --password string       password to access secure wallet
  --privkey bytesBase64   Specify a base64 private key
  --pubkey bytesBase64    Specify a base64 public key

Global Flags:

 --root string   Set root directory (default "./")

Example of Creating a new Key file:

To get private and public keys

sudo cat $OLDATA/consensus/config/priv_validator_key.json

You can choose a name for this account (Optional).

olclient account add --privkey "XXXXXX" --pubkey "XXXXXX" --name "YOURACCOUNTNAME"

then input the password to protect your account

6. You should see under keystore folder a new file was created. Should look something like this:

OL_2020-10-15T10:19:43.607177297EDT_0lt1234536976ea8b19cff97ddbe286511a690dbcbf

And your password has been reset for this account.