【问题标题】:Failed to create certificate when I want to run source ./vars and ./clean-all [closed]当我想运行 source ./vars 和 ./clean-all 时创建证书失败 [关闭]
【发布时间】:2014-12-01 03:27:56
【问题描述】:

我找到了一个类似的帖子,但它仍然不能解决我的问题。(OpenVPN Source vars not working on debian)

我根据以下设置 OpenVPN https://help.ubuntu.com/14.04/serverguide/openvpn.html

当我尝试按照以下指南创建证书时出现问题:

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 ../../

当我尝试时:

source ./vars

外壳还给我:

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

我忽略了它并尝试了下一行:

sudo ./clean-all

然后说:

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

我在 google 和 stackoverflow 中搜索,未能解决问题。

感谢您的帮助

谁能帮帮我?

【问题讨论】:

  • 这个问题似乎离题了,因为它与编程无关。也许Ubuntu Stack Exchange 会是一个更好的提问地点。

标签: ubuntu-14.04 openvpn


【解决方案1】:
  1. 重启电脑
  2. 打开终端并输入sudo su以root身份登录
  3. 移动到easy-rsa目录(在我的,文件在easy-rsa/2.0/
  4. 输入mkdir keys
  5. 输入source ./vars
  6. 输入./clean-all
  7. 输入./build-ca

    所有的命令都和以前一样,但是已经创建了键 目录并实际以 root 身份登录,而不是运行 sudo 似乎可以解决问题

取自这里:http://ubuntuforums.org/showthread.php?t=801135

【讨论】:

  • 是的。有用。我用 su - 切换root帐户,它可以运行。谢谢。
  • mkdir keys 对我来说是真正的重点,我认为 easy-rsa 可以自己处理。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-07-14
  • 1970-01-01
  • 2021-07-30
  • 1970-01-01
  • 2012-12-21
  • 1970-01-01
相关资源
最近更新 更多