本文只为简单的描述下当非owner私钥丢失后,如何重置

一般利用三方App创建账号,为了程序内好处理,并且减少用户的记录成本,都是owner和active共用一对公钥和私钥,这种只能第一时间赶紧将剩余的EOS转走,减少损失。并第一时间找社区提交仲裁。
所以建议用一些支持owner和active 单独设置公钥私钥的程序创建账号(在此不做推荐,避免不必要的风险)。在不需要owner的情况下,单独冷备份,平时只用active权限的账号进行操作。

下面开始演示,如何更换active私钥

查询账户
root@iZj6c1ho98e6b4nz3ulirvZ:~# cleos -u https://api.eosnewyork.io get account bcskillsurou

permissions: 
     owner     1:    1 EOS8Sq9MXKiop4J1PX3xfyDkzqaRpWp2tEqkBL4LiT3cvXmtc2yh4
     active     1:    1 EOS72Uoinz7Dgm4GpdhfoPUQx6NfosoyacvLsk7z2E9Y7z5DBsKjv
提前已创建好一对新的公钥私钥
5J4MbkkZHtroTW3FZQa3cEZFFr9EFPDm75yPFTuuS2B
EOS6zxf2t9qkgYYpjNWXy91edeVFjeWmaH7JQeQAn9SRiRefqMQ6W
开始更换active 公钥
root@iZj6c1ho98e6b4nz3ulirvZ:~# cleos -u https://api.eosnewyork.io set account permission bcskillsurou active '{"threshold": 1, "keys": [{"key": "EOS6zxf2t9qkgYYpjNWXy91edeVFjeWmaH7JQeQAn9SRiRefqMQ6W", "weight": 1}], "accounts": []}' active
Error 3050000: Action validate exception
Error Details:
Cannot set an authority as its own parent
pending console output:
需要active的父级权限
cleos wallet import
输入 EOS8Sq9MXKiop4J1PX3xfyDkzqaRpWp2tEqkBL4LiT3cvXmtc2yh4 的私钥
更换owner 权限,重新执行
root@iZj6c1ho98e6b4nz3ulirvZ:~# cleos -u https://api.eosnewyork.io set account permission bcskillsurou active '{"threshold": 1, "keys": [{"key": "EOS6zxf2t9qkgYYpjNWXy91edeVFjeWmaH7JQeQAn9SRiRefqMQ6W", "weight": 1}], "accounts": []}' owner
executed transaction: 31a9bf9448b3d9882f27767c427a6ece406319036b3d62e7a04d001f272365a2  160 bytes  1254 us
#         eosio <= eosio::updateauth            {"account":"bcskillsurou","permission":"active","parent":"owner","auth":{"threshold":1,"keys":[{"key...
再次查看账户
root@iZj6c1ho98e6b4nz3ulirvZ:~# cleos -u https://api.eosnewyork.io get account bcskillsurou

permissions: 
     owner     1:    1 EOS8Sq9MXKiop4J1PX3xfyDkzqaRpWp2tEqkBL4LiT3cvXmtc2yh4
     active     1:    1 EOS6zxf2t9qkgYYpjNWXy91edeVFjeWmaH7JQeQAn9SRiRefqMQ6W

active权限已更改

参考

EOS账户权限介绍以及增删改查