With all of the recent scams and phishing websites here on HIVE the topic of recovery accounts has come up again. A lot of people still have there recovery account set to @steem or the account, which created their account e.g. @esteemapp or @blocktrades.
Setting the recovery account to a HIVE account you trust is really important in case someone is taking over your account. Otherwise all your hardly earned HIVE will be lost and there is no way of recovering it. When choosing a recovery account it is important you choose someone you trust and someone, who can identify you.
I myself use another account I created as my recovery account. The keys of the account are locked away and not easily accessible by an attacker. But this may not be the best solution for everyone. In particular I have set @recovery.hive as the recovery account for @primersion and @primersion as the recovery account for @recovery.hive.
The only way an attacker would be able to steal all of my funds would be to gain access to the keys for both accounts and if this should happen, it is my own fault ;)
Changing your recovery account is quite easy. You can use tools like the one created by @arcange over here or the one created by @reazuliqbal you will find over here or change it directly on peakd.com under your Account Settings -> Keys & Permissions. Or you may use this small python script I wrote:
#!/usr/bin/python3
from beem import Hive
from beem.nodelist import NodeList
from beem.account import Account
nodelist = NodeList()
nodelist.update_nodes()
nodes = nodelist.get_hive_nodes()
account_name = input("Enter your account name: ")
owner_key = input("Enter your private owner key: ")
new_recovery_account = input("Enter new recovery account: ")
hive = Hive(node=nodes, keys=[owner_key])
account = Account(account_name, blockchain_instance=hive)
account.change_recovery_account(new_recovery_account)
print("Successfully changed recovery account")
You have to enter your account name and private owner key and the new recovery account and the script does the rest for you. Please be careful when using the script and when pasting your private owner key.
In addition to that I wrote a small script for recovering your account (if you are using another of your accounts as a recovery account for your main account). The script is based on the information provided here in the official docs:
#!/usr/bin/python3
import beembase
from beem.account import Account
from beem import Hive
from beem.transactionbuilder import TransactionBuilder
from beemgraphenebase.account import PasswordKey
from beembase.objects import Permission
from beem.nodelist import NodeList
# acquire hive node list
nodelist = NodeList()
nodelist.update_nodes()
nodes = nodelist.get_hive_nodes()
# capture user information
username = input('account to be recovered: ')
old_password = input('recent password for account: ')
new_password = input('new password for account: ')
recovery_account = input('account owner (recovery account): ')
recovery_account_private_key = input('account owner private ACTIVE key: ')
# create new account owner keys
new_account_owner_private_key = PasswordKey(username, new_password, role='owner').get_private_key()
new_account_owner_private_key_string = str(new_account_owner_private_key)
new_account_owner_public_key = str(new_account_owner_private_key.pubkey)
# create old account owner keys
old_account_owner_private_key = PasswordKey(username, old_password, role='owner').get_private_key()
old_account_owner_private_key_string = str(old_account_owner_private_key)
old_account_owner_public_key = str(old_account_owner_private_key.pubkey)
new_owner_authority = {
"key_auths": [
[new_account_owner_public_key, 1]
],
"account_auths": [],
"weight_threshold": 1
}
# recovery request data object creation
request_op_data = {
'account_to_recover': username,
'recovery_account': recovery_account,
'new_owner_authority': new_owner_authority,
'extensions': []
}
# recovery request operation creation
request_op = beembase.operations.Request_account_recovery(**request_op_data)
print('request_op_data')
print(request_op_data)
# recovery request broadcast
hive = Hive(node=nodes, keys=[recovery_account_private_key])
request_result = hive.finalizeOp(request_op, recovery_account, "active")
print('request_result')
print(request_result)
recent_owner_authority = {
"key_auths": [
[old_account_owner_public_key, 1]
],
"account_auths": [],
"weight_threshold": 1
}
op_recover_account_data = {
'account_to_recover': username,
'new_owner_authority': new_owner_authority,
'recent_owner_authority': recent_owner_authority,
'extensions': []
}
op_account_update_data = {
"account": username,
"active": {
"key_auths": [
[str(PasswordKey(username, new_password, role='active').get_private_key().pubkey), 1]
],
"account_auths": [],
"weight_threshold": 1
},
"posting": {
"key_auths": [
[str(PasswordKey(username, new_password, role='posting').get_private_key().pubkey), 1]
],
"account_auths": [],
"weight_threshold": 1
},
"memo_key": str(PasswordKey(username, new_password, role='memo').get_private_key().pubkey),
"json_metadata": ""
}
op_recover_account = beembase.operations.Recover_account(**op_recover_account_data)
print('op_recover_account')
print(op_recover_account)
tb = TransactionBuilder(blockchain_instance=hive)
tb.appendOps([op_recover_account])
tb.appendWif(str(old_account_owner_private_key))
tb.appendWif(str(new_account_owner_private_key))
tb.sign()
result = tb.broadcast()
print('result')
print(result)
op_account_update = beembase.operations.Account_update(**op_account_update_data)
print('op_account_update')
print(op_account_update)
hive = Hive(node=nodes, keys=[new_account_owner_private_key])
tb = TransactionBuilder(blockchain_instance=hive)
tb.appendOps([op_account_update])
tb.appendWif(str(new_account_owner_private_key))
tb.sign()
result = tb.broadcast()
print('result')
print(result)
You will have to enter the account to be recovered, a recent password of the account and a new password for the account. For the actual recovery account you have to enter the account name and the private active key of the account. The remaining stuff like creating the account recovery request, recovering the account and updating the account data will be done by the script.
Please update your recovery account right now if you still have it set to @steem
Which account are you using as your recovery account, someone you trust or just some well-known and trustworthy account?
Like what I am doing - please support me by voting for my HIVE / Hive-Engine witness.
!jeenger
!invest_vote
Great write-up. I very recently updated the Hive version of the Account Recovery python tutorial:
https://developers.hive.io/tutorials-python/account_recovery.html
Oh, that's awesome, thanks for letting me know. I must have missed that :D !BEER
View or trade
BEER
.Hey @inertia, here is a little bit of
BEER
from @primersion for you. Enjoy it!Learn how to earn FREE BEER each day by staking your
BEER
.I updated the link to point to the hive doc :)
I have a question, somewhat related. I can not find a way to edit the bitcoin address I set in my profile back in the ST##M days, which has carried forward to Hive.
That is quite interesting. I think none of the interfaces for hive (hive.blog, peakd, ecency...) have implemented this. The information does show up over here https://ipfs.ausbit.dev/#/@mytechtrail on @ausbitbank's site, but there is also no way to edit it. So the only way to go is probably to create a custom script for changing it. I will check that out if I have time this week and come back to you.
Thanks, I thought you might be able to point me in the correct direction.
I went to that site on @centerlink's advice and was able to edit the posting JSON Metadata, but the JSON Metadata still show's the old bitcoin address. @ausbitbank do you have any comment?
Sorry, it only lets you edit the posting json metadata for now. Updating it to allow editing both metadata's is on the todo list. It was me posting as centerlink earlier..
Thank you for the reply. looking forward to the future update.
https://hive.ausbit.dev/@mytechtrail login with hive keychain in the top right menu, then cick the yellow edit button near profile metadata to edit
Many thanks, I had been on that page before, but had not been able make it work.
!WINE
!BEER
for you
Congratulations, @eii You Successfully Shared 0.100 WINE With @primersion.
You Earned 0.100 WINE As Curation Reward.
You Utilized 1/2 Successful Calls.
Total Purchase : 24816.918 WINE & Last Price : 0.290 HIVE
HURRY UP & GET YOUR SPOT IN WINE INITIAL TOKEN OFFERING -ITO-
WINE Current Market Price : 0.270 HIVE
Thanks for mentioning Ecency and esteemapp 🙏 We do help users with account recovery, so any user signup with Ecency, should be fine. Learn more about Ecency, don't miss our amazing updates.
Follow @ecency as well!
Support Ecency, in our mission:
Ecency: https://ecency.com/proposals/141
Hivesigner: Vote for Proposal
thank god python is an easy language to learn
Posted Using LeoFinance Beta
Your current Rank (70) in the battle Arena of Holybread has granted you an Upvote of 100%
@cervisia denkt du hast ein Vote durch @investinthefutur verdient!
@cervisia thinks you have earned a vote of @investinthefutur !
Your contribution was curated manually by @cervisia
Keep up the good work!
View or trade
BEER
.Hey @primersion, here is a little bit of
BEER
from @eii for you. Enjoy it!Learn how to earn FREE BEER each day by staking your
BEER
.Congratulations @primersion! You received a personal badge!
Wait until the end of Power Up Day to find out the size of your Power-Bee.
May the Hive Power be with you!
You can view your badges on your board and compare yourself to others in the Ranking
Check out the last post from @hivebuzz: