Solved

Java Keytool Keystore Password Reset

Posted on 2010-11-10
8
5,180 Views
Last Modified: 2012-05-10
Hi, I'm trying to generate a self-signing key using Java Keytool but I'm getting following error:

C:\Users\spark>keytool -genkey -keyalg rsa -alias tstkey
Enter keystore password:  abc123
keytool error: java.io.IOException: Keystore was tampered with, or password was
incorrect

I previously created a keystore password, but I can't remember what it was. I deleted my JRE and JDK and reinstalled but I had no luck. Is there a way to reset the password? Where is the keystore file located?
0
Comment
Question by:shepp_it
  • 3
  • 3
  • 2
8 Comments
 
LVL 92

Expert Comment

by:objects
ID: 34107676
you need to create a new keystore
0
 
LVL 92

Accepted Solution

by:
objects earned 250 total points
ID: 34107726
0
 

Author Comment

by:shepp_it
ID: 34120529
Hi I'm getting following error when I used the example from above link you provided:

C:\Program Files\Java\jdk1.6.0_19\bin>keytool -keystore myKeystore -keypasswd se
cret -genkey -keyalg RSA -alias mycert
keytool error: java.lang.RuntimeException: Usage error, secret is not a legal co
mmand
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 250 total points
ID: 34120778
Leave out the word 'secret' - it has to prompt you for it
0
 

Author Comment

by:shepp_it
ID: 34120924
Thank you. Can you also tell me how to delete the certificate and keystore I created?
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 34121233
Just delete the directory from the filesystem
0
 

Author Comment

by:shepp_it
ID: 34121267
Ok Thanks
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 34121330
:)
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question