1

When I installed Tomcat 8 on my Ubuntu 15.04 I used the following command to create the user "tomcat":

sudo adduser \
  --system \
  --shell /bin/bash \
  --gecos 'Tomcat Java Servlet and JSP engine' \
  --group \
  --disabled-password \
  --home /home/tomcat \
  tomcat

As a consequence, I don't have a password. Now I need to generate a CSR in order to install the SSL certificate on Tomcat 8. For that I am using this tutorial.

While running command keytool -genkey -alias tomcat -keyalg RSA -keystore <your_keystore_filename> it requests a password for user 'tomcat'. I tried hitting ENTER but it doesn't work.

What should I do?

Arturo
  • 423
  • 3
  • 6
  • 20

2 Answers2

4

Well I don't think that keytool command is asking you the password for tomcat user. Generating a self-signed certificate has nothing to do with the system user. Keytool command ask you to set the password for the certificate you are generating.

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: 
Gaurav Pundir
  • 1,496
  • 12
  • 14
0

Try the openssl commandline. You will find a lot of howtos for creating self signed certificates.

allo
  • 1,620
  • 2
  • 22
  • 39