When a Steem account is created, the creator becomes the account's recovery agent in case of a stolen account, or an error when changing passwords. The main caveat to Steem account recoveries is that a working Master password or Owner private key must have been properly backed up to be able to recover an account.
The steps for a user to perform an account recovery are quite involved. Firstly, the user must generate a new set of keys using a new password. Once the keys are generated, the owner public key needs to be sent to the recovery agent so they can perform a recovery request on the blockchain. Only after the recovery request has been executed can the actual account recovery take place. The account owner will need to carefully follow the steps listed below, and in the README, to successfully complete account recovery.
This is an advanced process that should not be done without great care. Ensure that you always back up any passwords and keys associated with your account, even if you think you will not need them anymore.
git clone https://github.com/steemdevs/steem-examplesaccount_recovery directory
cd steem-examples/javascript/account_recoverynpm installnpm run getkeys USERNAME NEW_PASSWORDnpm run recover USERNAME NEW_PASSWORD OLD_PASSWORD