首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >为用户“tomcat”创建本地自签名证书

为用户“tomcat”创建本地自签名证书
EN

Server Fault用户
提问于 2016-02-07 23:24:47
回答 2查看 108关注 0票数 1

当我在Ubuntu15.04上安装Tomcat 8时,我使用以下命令创建用户"tomcat":

代码语言:javascript
运行
复制
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”的密码。我试过按回车,但不起作用。

我该怎么办?

EN

回答 2

Server Fault用户

回答已采纳

发布于 2016-02-08 06:23:41

我不认为keytool命令会问你tomcat用户的密码。生成自签名证书与系统用户无关。Keytool命令要求您设置正在生成的证书的密码。

代码语言:javascript
运行
复制
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: 
票数 4
EN

Server Fault用户

发布于 2016-02-08 00:23:05

尝试openssl命令行。您将发现创建自签名证书的许多操作方法。

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/754609

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档