我試圖導入一個可信任的證書到Java cacerts keystore,但我遇到了問題。我試圖列出現有的可信證書,看起來密鑰庫沒有密碼保護。如何進入無密碼保護的Java密鑰庫或更改密碼?
$ keytool -list -keystore cacerts
Enter keystore password:
***************** WARNING WARNING WARNING *****************
* The integrity of the information stored in your keystore *
* has NOT been verified! In order to verify its integrity, *
* you must provide your keystore password. *
***************** WARNING WARNING WARNING *****************
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 76 entries
我試圖導入一個受信任的證書:
$ keytool -importcert -alias "JiraCert" -file /root/c9ssl.crt -keystore /etc/java-6-sun/security/cacerts
Enter keystore password:
Keystore password is too short - must be at least 6 characters
Enter keystore password:
Keystore password is too short - must be at least 6 characters
Enter keystore password:
Keystore password is too short - must be at least 6 characters
Too many failures - try later
我也試圖從 「無」 更改密碼的東西:
$ keytool -storepasswd -keystore cacerts.back
Enter keystore password:
Keystore password is too short - must be at least 6 characters
Enter keystore password:
Keystore password is too short - must be at least 6 characters
Enter keystore password:
Keystore password is too short - must be at least 6 characters
Too many failures - try later
謝謝!我無法弄清楚爲什麼密碼是! – 2012-05-24 16:22:30
是的,謝謝。多麼可怕的默認密碼。我無法弄清楚它是什麼。我剛剛刪除了cacerts文件,並用我自己的文件替換了它。 – HeyWatchThis 2012-08-15 23:37:52
正如datasmid所述,如果您正在運行Mountain Lion,Mac密碼也是「changeit」 – Niro 2013-04-16 16:40:16