Failed to create certificate when I want to start the source. / vars and. / clean-all

I found a similar thread, but it still does not fix my problem. ( OpenVPN Source vars does not work on debian )

I installed OpenVPN according to https://help.ubuntu.com/14.04/serverguide/openvpn.html

and there was a problem when I tried to create my certificate according to the following guide:

cd /etc/openvpn/easy-rsa/ ## move to the easy-rsa directory sudo chown -R root:admin . ## make this directory writable by the system administrators source ./vars ## execute your new vars file ./clean-all ## Setup the easy-rsa directory (Deletes all keys) ./build-dh ## takes a while consider backgrounding ./pkitool --initca ## creates ca cert and key ./pkitool --server server ## creates a server cert and key cd keys openvpn --genkey --secret ta.key ## Build a TLS key cp server.crt server.key ca.crt dh1024.pem ta.key ../../ 

when i try:

 source ./vars 

the shell returns me:

 NOTE: If you run ./clean-all, I will be doing a rm -r on /etc/openvpv/easy-rsa/keys 

I ignored it and tried the following line:

 sudo ./clean-all 

Then he says:

 Please source the vars script first (ie "source ./vars") Make sure you have edited it to reflect your configuration 

I searched on google and stackoverflow, could not solve the problem.

thanks for the help

Can anyone help me?

+5
source share
1 answer
  • Reboot the computer.
  • Open a terminal and enter sudo su to log in as root
  • go to the easy-rsa directory (on mine, the files are in easy-rsa / 2.0 /)
  • enter mkdir keys
  • type of source. / vars
  • type./clean-all
  • type./build-ca

    all the same commands as before, but having created the keys and actually registered as root, instead of starting it with sudo, it seemed to do the trick

Taken from here: http://ubuntuforums.org/showthread.php?t=801135

+8
source

Source: https://habr.com/ru/post/1208009/


All Articles