Wednesday, 28 December 2016

How to change the alias name of JKS file!!!!

Hi All

How to change the alias name of JKS file once we generated?

Step1 : To view what alias is available present in JKS file, use the below command

Open the command prompt and got the location where the jks file is available and execute below command
keytool -list -v -keystore <jks file name>

Example:
keytool -list -v -keystore test.jks

Step2 : once you executed the above command it will ask you the jks password, enter the same then it will display all the details like what all are certificated available in jks, expiry of certificates, alias name..etc..

Step3 : Execute the below command to change the alias name

keytool -keyclone -alias "old alias name" -dest "new alias name" -keystore <jks file>

Example :
keytool -keyclone -alias "pavan" -dest "kumar" -keystore test.jks

once you have execute above command it will ask you the password of jks, enter the same.
Done..!!!!enjoy..


How to change the certificate password

Hi All, after a long time posting again

How to change the certificate password using keytool command

Step1: open to the command prompt and go to the location where the certificate exists.
Step2:  execute the below command

keytool -storepasswd -keystore <jks file name>

Example
keytool -storepasswd -keystore test.jks

Step3: it will ask you the current password enter the same.
Step4: it will ask you the new password enter the new password.
Step5: it will ask you the password again for confirmation enter the same password which is entered  
           in step5.
Step6: thats it!!! your jks file got changed with new password....enjoy!!!!