6

My active and owner keys are the same. I want to change active key to be different from owner, for safety.

What command should I use?

2
  • Is it possible to set the account keys from within a smart contract action rather than calling cleos?
    – Max
    Commented Aug 1, 2018 at 11:52
  • is there an easier way to do this for someone who is not technical? Commented Aug 26, 2018 at 5:45

1 Answer 1

9

Looks like I found the answer I was looking for.

cleos set account permission accountname active '{"threshold": 1, "keys": [{"key": "NEW_ACTIVE_PUBLIC_KEY", "weight": 1}]}' owner

When having weight 1 you can simply use this alias instead:

cleos set account permission accountname active NEW_ACTIVE_PUBLIC_KEY owner -p accountname@owner

After, you can check that it worked with:

cleos get account accountname

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.