What is the correct process to unlock an account? I was able to do this successfully in the geth console(see this post for more details on what I've tried Why does account show 0 balance, after seemingly successful transaction in geth console?)

enter image description here

up vote 6 down vote accepted

Well, there are a few ways to unlock an account

  1. While starting geth, you can use --unlock

Unlock an account (may be creation index) until this program exits (prompts for password). --unlock takes multiple params, it could be an index of your account like 0, 2, 3 or it can be an address 0x12a.. or this can be primary to unlock primary account.

  1. from the geth console

personal.unlockAccount(address, "password")

Unlock multiple accounts from the command line

  --unlock      Unlock an account (may be creation index) until this program exits (prompts for password)
  --password    Password file to use with options/subcommands needing a pass phrase

Command example

geth --unlock primary --password "/path/to/file" this will unlock your primary account if the password specified in "/path/to/file" is correct.

From How to unlock accounts programmatically after the node has started? :

> geth --exec "personal.unlockAccount(eth.accounts[0], 'password', 1000)" attach
true

You are probably using the RPC API interface, so will need to enable the personal API using

geth [your options] --rpcapi "eth,net,web3,admin" [more options]

But be careful with the RPC API and the unlocking of your wallet if you hold real ethers in your wallet. See How to reduce the chances of your Ethereum wallet getting hacked?.

  • for now, is running on a private testnet. No real ethers yet – malexanders Jun 3 '16 at 2:19
  • @matthewalexander Did you figure this out? – bombayquant Dec 1 '16 at 2:16
  • The accepted answer in this thread solved my problem I believe – malexanders Dec 5 '16 at 16:46

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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