当我在Ubuntu15.04上安装Tomcat 8时,我使用以下命令创建用户"tomcat":
sudo adduser \
--system \
--shell /bin/bash \
--gecos 'Tomcat Java Servlet and JSP engine' \
--group \
--disabled-password \
--home /home/tomcat \
tomcat
因此,我没有密码。现在,我需要生成一个CSR,以便在Tomcat 8上安装SSL证书。为此,我使用了本教程本教程。
在运行命令keytool -genkey -alias tomcat -keyalg RSA -keystore <your_keystore_filename>
时,它请求用户“tomcat”的密码。我试过按回车,但不起作用。
我该怎么办?
发布于 2016-02-07 22:23:41
我不认为keytool命令会问你tomcat用户的密码。生成自签名证书与系统用户无关。Keytool命令要求您设置正在生成的证书的密码。
keytool -genkey -alias tomcat -keyalg RSA -keystore /applications/certs/test.key
Enter keystore password:
Re-enter new password:
What is your first and last name?
[Unknown]: example.com
What is the name of your organizational unit?
[Unknown]: test
What is the name of your organization?
[Unknown]: test
What is the name of your City or Locality?
[Unknown]: delhi
What is the name of your State or Province?
[Unknown]: delhi
What is the two-letter country code for this unit?
[Unknown]: IN
Is CN=example.com, OU=test, O=test, L=delhi, ST=delhi, C=IN correct?
[no]: yes
Enter key password for <tomcat>
(RETURN if same as keystore password):
Re-enter new password:
发布于 2016-02-07 16:23:05
尝试openssl
命令行。您将发现创建自签名证书的许多操作方法。
https://serverfault.com/questions/754609
复制相似问题