LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-17-2023, 08:46 AM   #1
MST
LQ Newbie
 
Registered: Sep 2014
Posts: 20

Rep: Reputation: Disabled
Restarting HTTPs service


Hello,

Any work around for certificate password in hash when restarting HTTPD service in Linux?
I know how to manually restart the service so after that I have to put SSL cert password.

Is there any work around if I want to create the script and put the password in the script.

Thank you,
 
Old 02-17-2023, 10:03 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,176
Blog Entries: 1

Rep: Reputation: 2043Reputation: 2043Reputation: 2043Reputation: 2043Reputation: 2043Reputation: 2043Reputation: 2043Reputation: 2043Reputation: 2043Reputation: 2043Reputation: 2043
Quote:
Originally Posted by MST View Post
Hello,

Any work around for certificate password in hash when restarting HTTPD service in Linux?
I know how to manually restart the service so after that I have to put SSL cert password.

Is there any work around if I want to create the script and put the password in the script.

Thank you,
If you want to store the ssl passphrase in a file in clear text, read this

Regards
 
Old 02-17-2023, 10:22 AM   #3
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Question

If you are going to put a password on a cert, then have that password in a script on the same box, is there any reason to have the password in the first place? Seems like extra steps to have no security...
 
1 members found this post helpful.
Old 02-17-2023, 10:22 AM   #4
maw_walker
Member
 
Registered: Jul 2021
Posts: 119

Rep: Reputation: Disabled
When you generate or get the certificate from whomever you got it from, If you don't specify a password when creating the certificate, then you won't prompted. The caveat to this is you have to protect the certificate private key because if someone can get a hold of it, they can impersonate your server. Hard coding passwords s never a good idea but if someone is on your box and can get at the script, you've got bigger issues...
 
1 members found this post helpful.
Old 02-17-2023, 11:24 AM   #5
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,275

Rep: Reputation: 5342Reputation: 5342Reputation: 5342Reputation: 5342Reputation: 5342Reputation: 5342Reputation: 5342Reputation: 5342Reputation: 5342Reputation: 5342Reputation: 5342
The standard way is to have the script read the password from an environment variable.
 
Old 02-17-2023, 03:11 PM   #6
elgrandeperro
Member
 
Registered: Apr 2021
Posts: 415
Blog Entries: 2

Rep: Reputation: Disabled
It provides no security for apache. It is just something to annoy you. So you can remove it using openssl.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
systemctl status postgresql-tst.service starts the service if service is stopped MarianForums Linux - Newbie 7 11-03-2018 03:02 PM
[SOLVED] Need suggestion:->>Failed HTTPS transfer to https://supportfiles.sun.com/curl manalisharmabe Solaris / OpenSolaris 11 01-10-2014 12:58 AM
https certication error , the page can not be loaded via https ust Linux - Server 2 11-21-2013 08:49 PM
redirect https://www.domain.com to https://domain.com decenter Linux - Server 4 09-13-2011 10:05 AM
apache 2.0 https to https redirect struct Linux - Software 1 04-22-2011 05:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration