Linode Forum
https://forum.linode.com/

ProblemFollowing Secure Communications with OpenVPN tutorial
https://forum.linode.com/viewtopic.php?f=19&t=10564
Page 1 of 1

Author:  forbajato [ Mon Oct 28, 2013 4:54 pm ]
Post subject:  ProblemFollowing Secure Communications with OpenVPN tutorial

I am trying to set up an openvpn server on my linode but ran into a problem I can't figure out. In the "Initializing Public Key Infrastructure" section of the tutorial found here (https://library.linode.com/networking/o ... 04-precise) I see the command:

Code:
. /etc/openvpn/easy-rsa/2.0/vars


I do that (as a regular user) and get the expected outcome. However, when I go to the next step

Code:
. /etc/openvpn/easy-rsa/2.0/clean-all


I get unexpected outcome, I am told the script can not create the needed directory. If I run the command as:

Code:
 sudo /etc/openvpn/easy-rsa/2.0/clean-all


I am told I need to source the vars file first - seems like I had just done that!

I am running as a regular user and so try with sudo - the error is that the "." is 'command not found'. What is that "." at the beginning of the line anyway? How do you get around it?

thomas

Author:  forbajato [ Tue Oct 29, 2013 3:59 pm ]
Post subject:  Re: ProblemFollowing Secure Communications with OpenVPN tuto

Hmmm, I seem to have solved the problem (though I am still mystified by the leading "." in the commands in the tutorial). Turns out I couldn't get this to do this by logging in as my normal user and then using sudo but if I did a switch user to the root user and issued the commands everything worked fine.

Code:
sudo su root


Not sure what the difference is between being root and using sudo in this case ... other than one worked and one didn't!

thomas

Author:  Vance [ Tue Oct 29, 2013 11:01 pm ]
Post subject:  Re: ProblemFollowing Secure Communications with OpenVPN tuto

The dot "." causes the shell to read and execute the commands in the named file.

You ran into some problems because a sudo environment doesn't inherit all the settings of the invoking environment. You can run sudo su - to get a root shell, then execute your commands as root, and type exit to return to your original user. (Which is mostly what you did.)

Author:  forbajato [ Wed Oct 30, 2013 4:00 pm ]
Post subject:  Re: ProblemFollowing Secure Communications with OpenVPN tuto

Vance,

Thanks for the clear explanation. I have been using Linux for 8 or so years and had not run across that.

thomas

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/