Search code examples
certificatekeystore

Changing a .keystore password


I have the following steps:

1) Open Terminal and cd to where your .keystore is located

2) keytool -storepasswd -new NEWPASSWORD -keystore YOURKEYSTORE.keystore

3) enter your current password

My question is instead of doing step 3, how can I do it with a keytool command?

Thanks.


Solution

  • Close but not quite, eventually I figured out that the password should be changed in two locations, keypasswd & storepasswd:

    1) keytool -storepass XXX -keypasswd -keypass XXXXX -new XXXX -keystore "c:\temp\XXXX.keystore" -alias XXX

    2) keytool -storepass XXX -storepasswd -new XXXX -keystore "c:\temp\XXX.keystore" -alias XXX