0

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??? – goodvibration Jun 25 '18 at 9:28
0

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? – Akhil Kintali Jun 25 '18 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. – Jesse Busman Jun 25 '18 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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