I have 17k ethereum addresses. I want to change passphrase all of them. Are there any way to change all addresses passphrase?
geth account update 0x... It is really hard to change 17k addresses password. I need suggestion.
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
You could make a python script that take all the files in a folder,
def find_keystores(): onlyfiles = [f for f in listdir(keystorepath) if isfile(join(keystorepath, f))] counter = 0 accounts =  for file in onlyfiles: accounts.append(onlyfiles[counter]) counter = counter + 1 return accounts
then iterate through them and decrypt it with the current passphrase using web3py
onlyfiles = [f for f in listdir(keystorepath) if isfile(join(keystorepath, f))] with open(keystorepath + "/" +onlyfiles) as keyfile: encrypted_key = keyfile.read() private_key = w3.eth.account.decrypt(encrypted_key, passphrase)
After you have extracted the private key, you recreate the keystore
keystore = w3.eth.account.encrypt(private_key, new_passphrase)
This is valid also in other languages (nodejs, rust), the concept is the same. Just know that the decryption and the encryption of keystore files consume a lot of cpu resources.