I know that the password of an account in geth can be changed using the command geth account update on the geth console.

Do I have a similar function in solidity to change the account password which I can use in my smart contract?

  • 2
    You want to change the lock from inside the vault? Why??? Jun 25, 2018 at 9:28

1 Answer 1


No, this can not be done from solidity. This assumes that all the accounts are linked to nodes and this is not the case. Even if that were true, although the smart contract can get info of the node that mined the current block, this is not necessarily the node that generated the transaction. Furthermore, there is not a practical case in which a person will decide to make a transaction to change the password of his account.

  • What if I handed over an account to a user and he wants to change the password? Is the only option to change password is via geth console? Jun 25, 2018 at 9:46
  • 1
    @AkhilKintali Handing an account over is bad security practice. Private keys should be generated on the user's computer, and should never be transferred to another person. Please understand that accounts in Ethereum are a 100% offline concept. Changing the password of an account on one computer doesn't change it on another. Both parties would still be able to access the funds.
    – Jesbus
    Jun 25, 2018 at 9:47

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.