?
Solved

Java Keytool Keystore Password Reset

Posted on 2010-11-10
8
Medium Priority
?
6,095 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1000 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
2017 Webroot Threat Report

MSPs: Get the facts you need to protect your clients.
The 2017 Webroot Threat Report provides a uniquely insightful global view into the analysis and discoveries made by the Webroot® Threat Intelligence Platform to provide insights on key trends and risks as seen by our users.

 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 1000 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

Threat Trends for MSPs to Watch

See the findings.
Despite its humble beginnings, phishing has come a long way since those first crudely constructed emails. Today, phishing sites can appear and disappear in the length of a coffee break, and it takes more than a little know-how to keep your clients secure.

Question has a verified solution.

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

The well known Cerber ransomware continues to spread this summer through spear phishing email campaigns targeting enterprises. Learn how it easily bypasses traditional defenses - and what you can do to protect your data.
What we learned in Webroot's webinar on multi-vector protection.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

649 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