Re: Two questions about key generation for clients

Bo Berglund <[email protected]>
Newsgroups gmane.network.openvpn.user
Message-ID <[email protected]>
On Tue, 23 Jan 2024 00:23:31 +0100, David Sommerseth via Openvpn-users
<[email protected]> wrote:

>On 21/01/2024 17:34, tincantech via Openvpn-users wrote:
><snip>
>> 
>>> Can I edit this file and remove the item --suppress-timestamps to possibly
>>> enable the timestamps? And remove the machine-readable-output item in the actual
>>> service conf file?
>>> Will that result in human-readable timestamps?
>> 
>> The recommended method is to copy the file to /etc/systemd/system.
>
>Actually, the preferred way is to use
>
>     # systemctl edit openvpn-server@CONFIG_NAME
>
>You now get an new file where you just add the "ini sections" and 
>settings you want to modify.  In this case, you would add the 
>"[Service]" section and add the modified ExecStart= line to your liking.
>
>These changes are saved separately and will always be merged into 
>service setup, even when the unit file from the upstream OpenVPN package 
>gets updated.
>
>If you do the "copy to /etc/systemd/system" trick, that will completely 
>override the unit file shipped with the OpenVPN package.

I don't really understand this, could you expand a bit:

1) The "sudo systemctl edit" command brings up a blank page for me, what is the
editor commands in this window? I am used to how nano works but not how I can
operate in this case. Tried Ctl-X and Ctl-C to get back from it...

2) It seems one can *add* commands using this but how do I *remove* a setting I
don't want like the one we discuss now?
I want to NOT have the --suppress-timestamps item there!

3) What is the correct syntax for executing the command?

On my system I have this:

systemctl | grep openvpn

  [email protected]
loaded active running   OpenVPN service for server
  [email protected]
loaded active running   OpenVPN service for serverlocal

Do I do it like so:
sudo systemctl edit [email protected] 
or like this:
sudo systemctl edit openvpn-server@server

4) And can I use sudo or must I switch to su first to get to the # prompt?


-- 
Bo Berglund
Developer in Sweden
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.