用树莓派搭建VPN
在工厂中越来越多地采用了Raspberry PI。
它们配备着坚固的外壳,专门用于工厂销售,
还设有安全设置以便使用和操作。
有时候,我们可能会通过工厂的VPN将数据发送到管理服务器。
同样的工作也可以在Docker中完成。
使用Docker进行与Raspberry PI相同的操作,并验证该软件的功能和配置方法。
翻墙工具
虚拟私人网络
pivpn可以进行释义。
将树莓派设置为VPN服务器。
https://qiita.com/morinokami/items/8b58f210c2bdec2b13cd
打开VPN
使用Raspberry Pi搭建OpenVPN服务器。
链接:https://qiita.com/moyashimanjyu/items/3ee299acc3081630b1d6
用OpenVPN将家中的树莓派服务器公开
https://qiita.com/akiraak/items/4b28e0288cb440ab5ba0
把Raspberry Pi转化为VPNGate代理(无线AP路由器)。
@nabepy (中国网络用语)
将Raspberry Pi 3设置为OpenVPN服务器(前提环境③)VPN服务器。
[https://qiita.com/nabepy/items/aed364531dca9d20a079]
将树莓派3设为OpenVPN服务器(前提条件③)iPhone VPN客户端
使用iPhone与VPN连接,并携带树莓派环境进行演示。
软以太网
使用SoftEther VPN将Raspberry Pi设置为VPN服务器
在Raspberry Pi 3上设置SoftEther VPN花了六天时间。
在树莓派上建立VPN服务器
https://qiita.com/tkyonezu/items/00311e2285366984891c
如果有30分钟,你可以在RaspberryPI上建立一个VPN服务器(IPSec/L2TP Raspbian版本)。
《Raspberry Pi3搭建VPN服务器和VNC服务器,并记录了从iPhone上进行舰队Collection游戏的过程(第1部分)》
在树莓派上安装 SoftEther_VPN 客户端
https://qiita.com/ekzemplaro/items/57b13994fbd1b5e3c286
使用 Raspberry Pi3(Ubuntu18.04LTS) 上的SoftEther VPN。
将Softether VPN服务器设置在Raspberry Pi上。
通过SoftEtherVPN在云端将RaspberryPI手机上的USB连接到PC上
在树莓派上运行SoftEther VPN服务器https://qiita.com/kitashu/items/176e21c1a05bf5c90d09。
使用Raspberry Pi安装SoftEther VPN Bridge,创建一个始终VPN连接的网络。
自我参照
了解SoftEther
https://qiita.com/kaizen_nagoya/items/7a4062f845ebb2539e25
软Ether在Docker上(正在进行中)
https://qiita.com/kaizen_nagoya/items/fd8778bc768f2be734e2
阅读「ソフトイーサPacketiX VPN入門」。
https://qiita.com/kaizen_nagoya/items/3b1d330b2cddaacfa5b8
SoftEther在Docker上(CentOS版本)正在进行中。
https://qiita.com/kaizen_nagoya/items/8afc39c6a4b1d17d1f76
附錄: Docker 操作指南
OgawaKishinoMBP:Downloads ogawakiyoshi$ docker run -it -p 8080:8080 ubuntu /bin/bash
Unable to find image 'ubuntu:latest' locally
latest: Pulling from library/ubuntu
6abc03819f3e: Pull complete
05731e63f211: Pull complete
0bd67c50d6be: Pull complete
Digest: sha256:f08638ec7ddc90065187e7eabdfac3c96e5ff0f6b2f1762cf31a4f49b53000a5
Status: Downloaded newer image for ubuntu:latest
root@70c145ed23f8:/# apt update
Get:1 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:3 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [4168 B]
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:5 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [451 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1344 kB]
Get:9 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [5436 B]
Get:10 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [310 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB]
Get:12 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [803 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [7236 B]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1200 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [10.8 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [3671 B]
Get:18 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [942 B]
Fetched 16.2 MB in 8s (2135 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@70c145ed23f8:/# apt upgrade -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
bash debconf
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 738 kB of archives.
After this operation, 1024 B disk space will be freed.
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 bash amd64 4.4.18-2ubuntu1.1 [615 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 debconf all 1.5.66ubuntu1 [124 kB]
Fetched 738 kB in 3s (277 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 4040 files and directories currently installed.)
Preparing to unpack .../bash_4.4.18-2ubuntu1.1_amd64.deb ...
Unpacking bash (4.4.18-2ubuntu1.1) over (4.4.18-2ubuntu1) ...
Setting up bash (4.4.18-2ubuntu1.1) ...
update-alternatives: error: alternative path /usr/share/man/man7/bash-builtins.7.gz doesn't exist
(Reading database ... 4040 files and directories currently installed.)
Preparing to unpack .../debconf_1.5.66ubuntu1_all.deb ...
Unpacking debconf (1.5.66ubuntu1) over (1.5.66) ...
Setting up debconf (1.5.66ubuntu1) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
root@70c145ed23f8:/# apt install sudo vim apt-utils wget adduser gpasswd
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package gpasswd
root@70c145ed23f8:/# apt install sudo vim apt-utils wget adduser
Reading package lists... Done
Building dependency tree
Reading state information... Done
adduser is already the newest version (3.116ubuntu1).
The following additional packages will be installed:
ca-certificates file libapt-inst2.0 libexpat1 libgpm2 libmagic-mgc libmagic1 libmpdec2 libpsl5 libpython3.6 libpython3.6-minimal libpython3.6-stdlib libreadline7
libsqlite3-0 libssl1.1 mime-support openssl publicsuffix readline-common vim-common vim-runtime xxd xz-utils
Suggested packages:
gpm readline-doc ctags vim-doc vim-scripts
The following NEW packages will be installed:
apt-utils ca-certificates file libapt-inst2.0 libexpat1 libgpm2 libmagic-mgc libmagic1 libmpdec2 libpsl5 libpython3.6 libpython3.6-minimal libpython3.6-stdlib
libreadline7 libsqlite3-0 libssl1.1 mime-support openssl publicsuffix readline-common sudo vim vim-common vim-runtime wget xxd xz-utils
0 upgraded, 27 newly installed, 0 to remove and 0 not upgraded.
Need to get 14.6 MB of archives.
After this operation, 66.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libapt-inst2.0 amd64 1.6.10 [55.6 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 apt-utils amd64 1.6.10 [208 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libssl1.1 amd64 1.1.0g-2ubuntu4.3 [1130 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 openssl amd64 1.1.0g-2ubuntu4.3 [532 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic/main amd64 ca-certificates all 20180409 [151 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmagic-mgc amd64 1:5.32-2ubuntu0.2 [184 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmagic1 amd64 1:5.32-2ubuntu0.2 [68.5 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 file amd64 1:5.32-2ubuntu0.2 [22.1 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic/main amd64 libexpat1 amd64 2.2.5-3 [80.2 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic/main amd64 libmpdec2 amd64 2.4.2-1ubuntu1 [84.1 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-minimal amd64 3.6.7-1~18.04 [531 kB]
Get:12 http://archive.ubuntu.com/ubuntu bionic/main amd64 mime-support all 3.60ubuntu1 [30.1 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic/main amd64 readline-common all 7.0-3 [52.9 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic/main amd64 libreadline7 amd64 7.0-3 [124 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic/main amd64 libsqlite3-0 amd64 3.22.0-1 [496 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-stdlib amd64 3.6.7-1~18.04 [1711 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic/main amd64 sudo amd64 1.8.21p2-3ubuntu1 [428 kB]
Get:18 http://archive.ubuntu.com/ubuntu bionic/main amd64 xxd amd64 2:8.0.1453-1ubuntu1 [49.2 kB]
Get:19 http://archive.ubuntu.com/ubuntu bionic/main amd64 vim-common all 2:8.0.1453-1ubuntu1 [70.4 kB]
Get:20 http://archive.ubuntu.com/ubuntu bionic/main amd64 xz-utils amd64 5.2.2-1.3 [83.8 kB]
Get:21 http://archive.ubuntu.com/ubuntu bionic/main amd64 libpsl5 amd64 0.19.1-5build1 [41.8 kB]
Get:22 http://archive.ubuntu.com/ubuntu bionic/main amd64 publicsuffix all 20180223.1310-1 [97.6 kB]
Get:23 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 wget amd64 1.19.4-1ubuntu2.2 [316 kB]
Get:24 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgpm2 amd64 1.20.7-5 [15.1 kB]
Get:25 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6 amd64 3.6.7-1~18.04 [1415 kB]
Get:26 http://archive.ubuntu.com/ubuntu bionic/main amd64 vim-runtime all 2:8.0.1453-1ubuntu1 [5437 kB]
Get:27 http://archive.ubuntu.com/ubuntu bionic/main amd64 vim amd64 2:8.0.1453-1ubuntu1 [1152 kB]
Fetched 14.6 MB in 7s (2078 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libapt-inst2.0:amd64.
(Reading database ... 4040 files and directories currently installed.)
Preparing to unpack .../00-libapt-inst2.0_1.6.10_amd64.deb ...
Unpacking libapt-inst2.0:amd64 (1.6.10) ...
Selecting previously unselected package apt-utils.
Preparing to unpack .../01-apt-utils_1.6.10_amd64.deb ...
Unpacking apt-utils (1.6.10) ...
Selecting previously unselected package libssl1.1:amd64.
Preparing to unpack .../02-libssl1.1_1.1.0g-2ubuntu4.3_amd64.deb ...
Unpacking libssl1.1:amd64 (1.1.0g-2ubuntu4.3) ...
Selecting previously unselected package openssl.
Preparing to unpack .../03-openssl_1.1.0g-2ubuntu4.3_amd64.deb ...
Unpacking openssl (1.1.0g-2ubuntu4.3) ...
Selecting previously unselected package ca-certificates.
Preparing to unpack .../04-ca-certificates_20180409_all.deb ...
Unpacking ca-certificates (20180409) ...
Selecting previously unselected package libmagic-mgc.
Preparing to unpack .../05-libmagic-mgc_1%3a5.32-2ubuntu0.2_amd64.deb ...
Unpacking libmagic-mgc (1:5.32-2ubuntu0.2) ...
Selecting previously unselected package libmagic1:amd64.
Preparing to unpack .../06-libmagic1_1%3a5.32-2ubuntu0.2_amd64.deb ...
Unpacking libmagic1:amd64 (1:5.32-2ubuntu0.2) ...
Selecting previously unselected package file.
Preparing to unpack .../07-file_1%3a5.32-2ubuntu0.2_amd64.deb ...
Unpacking file (1:5.32-2ubuntu0.2) ...
Selecting previously unselected package libexpat1:amd64.
Preparing to unpack .../08-libexpat1_2.2.5-3_amd64.deb ...
Unpacking libexpat1:amd64 (2.2.5-3) ...
Selecting previously unselected package libmpdec2:amd64.
Preparing to unpack .../09-libmpdec2_2.4.2-1ubuntu1_amd64.deb ...
Unpacking libmpdec2:amd64 (2.4.2-1ubuntu1) ...
Selecting previously unselected package libpython3.6-minimal:amd64.
Preparing to unpack .../10-libpython3.6-minimal_3.6.7-1~18.04_amd64.deb ...
Unpacking libpython3.6-minimal:amd64 (3.6.7-1~18.04) ...
Selecting previously unselected package mime-support.
Preparing to unpack .../11-mime-support_3.60ubuntu1_all.deb ...
Unpacking mime-support (3.60ubuntu1) ...
Selecting previously unselected package readline-common.
Preparing to unpack .../12-readline-common_7.0-3_all.deb ...
Unpacking readline-common (7.0-3) ...
Selecting previously unselected package libreadline7:amd64.
Preparing to unpack .../13-libreadline7_7.0-3_amd64.deb ...
Unpacking libreadline7:amd64 (7.0-3) ...
Selecting previously unselected package libsqlite3-0:amd64.
Preparing to unpack .../14-libsqlite3-0_3.22.0-1_amd64.deb ...
Unpacking libsqlite3-0:amd64 (3.22.0-1) ...
Selecting previously unselected package libpython3.6-stdlib:amd64.
Preparing to unpack .../15-libpython3.6-stdlib_3.6.7-1~18.04_amd64.deb ...
Unpacking libpython3.6-stdlib:amd64 (3.6.7-1~18.04) ...
Selecting previously unselected package sudo.
Preparing to unpack .../16-sudo_1.8.21p2-3ubuntu1_amd64.deb ...
Unpacking sudo (1.8.21p2-3ubuntu1) ...
Selecting previously unselected package xxd.
Preparing to unpack .../17-xxd_2%3a8.0.1453-1ubuntu1_amd64.deb ...
Unpacking xxd (2:8.0.1453-1ubuntu1) ...
Selecting previously unselected package vim-common.
Preparing to unpack .../18-vim-common_2%3a8.0.1453-1ubuntu1_all.deb ...
Unpacking vim-common (2:8.0.1453-1ubuntu1) ...
Selecting previously unselected package xz-utils.
Preparing to unpack .../19-xz-utils_5.2.2-1.3_amd64.deb ...
Unpacking xz-utils (5.2.2-1.3) ...
Selecting previously unselected package libpsl5:amd64.
Preparing to unpack .../20-libpsl5_0.19.1-5build1_amd64.deb ...
Unpacking libpsl5:amd64 (0.19.1-5build1) ...
Selecting previously unselected package publicsuffix.
Preparing to unpack .../21-publicsuffix_20180223.1310-1_all.deb ...
Unpacking publicsuffix (20180223.1310-1) ...
Selecting previously unselected package wget.
Preparing to unpack .../22-wget_1.19.4-1ubuntu2.2_amd64.deb ...
Unpacking wget (1.19.4-1ubuntu2.2) ...
Selecting previously unselected package libgpm2:amd64.
Preparing to unpack .../23-libgpm2_1.20.7-5_amd64.deb ...
Unpacking libgpm2:amd64 (1.20.7-5) ...
Selecting previously unselected package libpython3.6:amd64.
Preparing to unpack .../24-libpython3.6_3.6.7-1~18.04_amd64.deb ...
Unpacking libpython3.6:amd64 (3.6.7-1~18.04) ...
Selecting previously unselected package vim-runtime.
Preparing to unpack .../25-vim-runtime_2%3a8.0.1453-1ubuntu1_all.deb ...
Adding 'diversion of /usr/share/vim/vim80/doc/help.txt to /usr/share/vim/vim80/doc/help.txt.vim-tiny by vim-runtime'
Adding 'diversion of /usr/share/vim/vim80/doc/tags to /usr/share/vim/vim80/doc/tags.vim-tiny by vim-runtime'
Unpacking vim-runtime (2:8.0.1453-1ubuntu1) ...
Selecting previously unselected package vim.
Preparing to unpack .../26-vim_2%3a8.0.1453-1ubuntu1_amd64.deb ...
Unpacking vim (2:8.0.1453-1ubuntu1) ...
Setting up readline-common (7.0-3) ...
Setting up libapt-inst2.0:amd64 (1.6.10) ...
Setting up libexpat1:amd64 (2.2.5-3) ...
Setting up mime-support (3.60ubuntu1) ...
Setting up xxd (2:8.0.1453-1ubuntu1) ...
Setting up sudo (1.8.21p2-3ubuntu1) ...
Setting up libgpm2:amd64 (1.20.7-5) ...
Setting up apt-utils (1.6.10) ...
Setting up libreadline7:amd64 (7.0-3) ...
Setting up libpsl5:amd64 (0.19.1-5build1) ...
Setting up libmagic-mgc (1:5.32-2ubuntu0.2) ...
Setting up libmagic1:amd64 (1:5.32-2ubuntu0.2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up publicsuffix (20180223.1310-1) ...
Setting up libssl1.1:amd64 (1.1.0g-2ubuntu4.3) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Setting up xz-utils (5.2.2-1.3) ...
update-alternatives: using /usr/bin/xz to provide /usr/bin/lzma (lzma) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man1/lzma.1.gz because associated file /usr/share/man/man1/xz.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/unlzma.1.gz because associated file /usr/share/man/man1/unxz.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzcat.1.gz because associated file /usr/share/man/man1/xzcat.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzmore.1.gz because associated file /usr/share/man/man1/xzmore.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzless.1.gz because associated file /usr/share/man/man1/xzless.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzdiff.1.gz because associated file /usr/share/man/man1/xzdiff.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzcmp.1.gz because associated file /usr/share/man/man1/xzcmp.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzgrep.1.gz because associated file /usr/share/man/man1/xzgrep.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzegrep.1.gz because associated file /usr/share/man/man1/xzegrep.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzfgrep.1.gz because associated file /usr/share/man/man1/xzfgrep.1.gz (of link group lzma) doesn't exist
Setting up openssl (1.1.0g-2ubuntu4.3) ...
Setting up wget (1.19.4-1ubuntu2.2) ...
Setting up vim-common (2:8.0.1453-1ubuntu1) ...
Setting up libsqlite3-0:amd64 (3.22.0-1) ...
Setting up vim-runtime (2:8.0.1453-1ubuntu1) ...
Setting up ca-certificates (20180409) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Updating certificates in /etc/ssl/certs...
133 added, 0 removed; done.
Setting up libmpdec2:amd64 (2.4.2-1ubuntu1) ...
Setting up file (1:5.32-2ubuntu0.2) ...
Setting up libpython3.6-minimal:amd64 (3.6.7-1~18.04) ...
Setting up libpython3.6-stdlib:amd64 (3.6.7-1~18.04) ...
Setting up libpython3.6:amd64 (3.6.7-1~18.04) ...
Setting up vim (2:8.0.1453-1ubuntu1) ...
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/fr/man1/vi.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group vi) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/it/man1/vi.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group vi) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/pl/man1/vi.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group vi) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/ru/man1/vi.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group vi) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/ja/man1/vi.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group vi) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/vi.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group vi) doesn't exist
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/fr/man1/view.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group view) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/it/man1/view.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group view) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/pl/man1/view.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group view) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/ru/man1/view.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group view) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/ja/man1/view.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group view) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/view.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group view) doesn't exist
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/fr/man1/ex.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group ex) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/it/man1/ex.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group ex) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/pl/man1/ex.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group ex) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/ru/man1/ex.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group ex) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/ja/man1/ex.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group ex) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/ex.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group ex) doesn't exist
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor (editor) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/fr/man1/editor.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group editor) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/it/man1/editor.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group editor) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/pl/man1/editor.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group editor) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/ru/man1/editor.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group editor) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/ja/man1/editor.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group editor) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/editor.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group editor) doesn't exist
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for ca-certificates (20180409) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
root@70c145ed23f8:/# adduser svpn
Adding user `svpn' ...
Adding new group `svpn' (1000) ...
Adding new user `svpn' (1000) with group `svpn' ...
Creating home directory `/home/svpn' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for svpn
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y
root@70c145ed23f8:/# gpasswd -a svpn sudo
Adding user svpn to group sudo
root@70c145ed23f8:/# gpasswd -a svpn adm
Adding user svpn to group adm
root@70c145ed23f8:/# gpasswd -a svpn admin
gpasswd: group 'admin' does not exist in /etc/group
root@70c145ed23f8:/# sudo useradd -s /bin/false
Usage: useradd [options] LOGIN
useradd -D
useradd -D [options]
Options:
-b, --base-dir BASE_DIR base directory for the home directory of the
new account
-c, --comment COMMENT GECOS field of the new account
-d, --home-dir HOME_DIR home directory of the new account
-D, --defaults print or change default useradd configuration
-e, --expiredate EXPIRE_DATE expiration date of the new account
-f, --inactive INACTIVE password inactivity period of the new account
-g, --gid GROUP name or ID of the primary group of the new
account
-G, --groups GROUPS list of supplementary groups of the new
account
-h, --help display this help message and exit
-k, --skel SKEL_DIR use this alternative skeleton directory
-K, --key KEY=VALUE override /etc/login.defs defaults
-l, --no-log-init do not add the user to the lastlog and
faillog databases
-m, --create-home create the user's home directory
-M, --no-create-home do not create the user's home directory
-N, --no-user-group do not create a group with the same name as
the user
-o, --non-unique allow to create users with duplicate
(non-unique) UID
-p, --password PASSWORD encrypted password of the new account
-r, --system create a system account
-R, --root CHROOT_DIR directory to chroot into
-s, --shell SHELL login shell of the new account
-u, --uid UID user ID of the new account
-U, --user-group create a group with the same name as the user
-Z, --selinux-user SEUSER use a specific SEUSER for the SELinux user mapping
--extrausers Use the extra users database
文件历史
版本0.01 初稿 20190523
版本0.02 添加docker 20190524
感谢您一直阅读到最后。
喜欢的话,请关注我 ?。
非常感谢您读到最后一句。
请点击喜欢的图标 ? 并关注我,让您获得幸福的生活。
这篇文章基于个人过去的经验,是个人感受。与我现在所属的组织和工作无关。