Koozali.org: home of the SME Server

Expired cert solution in wiki not working - missing folders

Offline winecooler

  • *
  • 37
  • +0/-0
Expired cert solution in wiki not working - missing folders
« on: September 12, 2013, 06:12:40 PM »
I'm having the issue where I get the ssl error constantly on my console. So to fix it I'm following the instructions in the wiki here. The first step tells me to do this:

Code: [Select]
cp /etc/e-smith/templates/home/e-smith/ssl.crt /etc/e-smith/templates-custom/home/e-smith/ssl.crt
However, there is no /home in the templates-custom folder. The only folder in there is /etc. Do I create a /home/e-smith folder or is there something else seriously wrong that I need to address first?

thanks!

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: Expired cert solution in wiki not working - missing folders
« Reply #1 on: September 12, 2013, 07:26:35 PM »
Code: [Select]
mkdir -p /etc/e-smith/templates-custom/home/e-smith/continue the how to after that

Code: [Select]
cp /etc/e-smith/templates/home/e-smith/ssl.crt /etc/e-smith/templates-custom/home/e-smith/ssl.crt
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline winecooler

  • *
  • 37
  • +0/-0
Re: Expired cert solution in wiki not working - missing folders
« Reply #2 on: September 12, 2013, 09:16:04 PM »
Okay I created the folder successfully, confirmed it was there. Then continued along with the instructions to fix the certificate errors (here).

I edited ssl.crt to extend it to 5 years, saved the file, confirmed it was set to the new value. I removed the 3 files specified (actually there were none in there anyhow). BTW, I don't see how removing 3 files will "force sme server to immediately create a new self signed certificate." I ran a post-upgrade and reboot afterwards.

The errors are still continuing. When I look in /home/e-smith/ssl.crt/ it is empty. Was the post-upgrade supposed to generate a new cert?

guest22

Re: Expired cert solution in wiki not working - missing folders
« Reply #3 on: September 12, 2013, 09:36:36 PM »
What error exactly do you get?

Offline winecooler

  • *
  • 37
  • +0/-0
Re: Expired cert solution in wiki not working - missing folders
« Reply #4 on: September 12, 2013, 09:52:53 PM »
Code: [Select]
Syntax error on line 134 of /etc/httpd/conf/httpd.conf:
SSLCertificate:file ' /home/e-smith/ssl.crt/server.domain.crt' does not exist or is empty


Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Expired cert solution in wiki not working - missing folders
« Reply #5 on: September 12, 2013, 10:33:31 PM »
BTW, I don't see how removing 3 files will "force sme server to immediately create a new self signed certificate."

"immediate" is incorrect.

Quote
I ran a post-upgrade and reboot afterwards.

That should create a new certificate.

guest22

Re: Expired cert solution in wiki not working - missing folders
« Reply #6 on: September 12, 2013, 11:09:31 PM »
signal-event console-save
signal-event post-upgrade
signal-event reboot

Try that sequence.

Offline winecooler

  • *
  • 37
  • +0/-0
Re: Expired cert solution in wiki not working - missing folders
« Reply #7 on: September 13, 2013, 02:43:44 AM »
I did that sequence and same result, there is nothing in /home/e-smith/ssl.crt/

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Expired cert solution in wiki not working - missing folders
« Reply #8 on: September 13, 2013, 03:57:11 AM »
winecooler

Please do the following & show us the output

cd /home/e-smith
ls -al

cd /home/e-smith/ssl.crt
ls -al

cd /home/e-smith/ssl.key
ls -al
cd /home/e-smith/ssl.pem
ls -al

cd /etc/e-smith/templates/home/e-smith
ls -al

cp /etc/e-smith/templates-custom/home/e-smith
ls -al


also
config show modSSL
« Last Edit: September 14, 2013, 02:52:08 AM by janet »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline winecooler

  • *
  • 37
  • +0/-0
Re: Expired cert solution in wiki not working - missing folders
« Reply #9 on: September 13, 2013, 04:25:34 AM »
okay i just took pictures, hope that's okay - here

some pics have multiple ls'

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Expired cert solution in wiki not working - missing folders
« Reply #10 on: September 13, 2013, 10:21:23 PM »
I edited ssl.crt to extend it to 5 years, saved the file, ...

I recommend you delete that custom template file and follow the reconfiguration steps to generate a new standard certificate file. You don't need 5 years - SME server will generate a new certificate file before the old one expires.

I suspect whatever customisation you made isn't working quite right. If so, you may see error messages in /var/log/messages during attempted template expansion.

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Expired cert solution in wiki not working - missing folders
« Reply #11 on: September 14, 2013, 02:54:29 AM »
winecooler

As Charlie says remove the custom template & reset the certificate.
Do:
rm /etc/e-smith/templates-custom/home/e-smith/ssl.crt
rmdir /etc/e-smith/templates-custom/home/e-smith

Then to reset the self signed certificate to standard do:

rm /home/e-smith/ssl.crt/*
rm /home/e-smith/ssl.key/*
rm /home/e-smith/ssl.pem/*
signal-event post-upgrade
signal-event reboot

That comes from
http://wiki.contribs.org/Certificates_Concepts#Expiration_time_of_the_self_signed_certificate

Let us know the outcome.

Once you get a standard certificate working & you know it's right, you can then make any custom template changes you want to.

From your photos:
ls -al /home/e-smith/ssl.crt

That is empty which is not a good thing !
It matches your error:
Syntax error on line 134 of /etc/httpd/conf/httpd.conf:
SSLCertificate:file ' /home/e-smith/ssl.crt/server.domain.crt' does not exist or is empty

It should have had a file in there with a name like
backup.titqet.local.crt

When reset it will follow the name of your server & the main domain name.
« Last Edit: September 14, 2013, 03:09:11 AM by janet »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Expired cert solution in wiki not working - missing folders
« Reply #12 on: September 14, 2013, 03:29:02 AM »
CharlieBrady

Quote
You don't need 5 years - SME server will generate a new certificate file before the old one expires.

Yes, but....
I'm sure you know this so for the benefit of others who don't, when the annual auto renewal happens, users who have put the self signed certificate into their browser etc, will get a warning message as the regenerated certificate is untrusted.
This causes "drama" as users get worried about these scary warnings & do not know or forget how to add the self signed certificate back into their browsers trusted root certificate list.

So a longer validity period removes this issue from happening annually, to every 5 years (or whatever validity period is chosen).
It does not remove the issue, but reduces the frequency of it happening.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline winecooler

  • *
  • 37
  • +0/-0
Re: Expired cert solution in wiki not working - missing folders
« Reply #13 on: September 17, 2013, 08:25:56 AM »
Hi janet, okay I followed those last instructions and the errors have gone. there is a cert there now. BTW would you mind removing the real domain name text from your post? don't need it searchable, thanks, just use "domain" or some such.

Thanks again!