玩客云刷amrbian并安装transmission作BT下载及开启samba实现文件下载与共享

发布于 2021-10-16  455 次阅读


kut6d0hy.png

{mtitle title="ID85821610"/}

事前先上参考文章,我们都是站在巨人的肩膀上

1、 玩客云/网心云 小白保姆教程 电视盒子、armbian、openwrt、双系统齐全【2021/10/12】
2、 玩客云armbian5.67手动安装qb,tr,samba,FTP实现文件下载与共享
3、 如何在Armbian 19.11.3 (debian 10)挂载NTFS移动硬盘

拆开玩客云

kut6olrs.png
撕掉后面黑色的胶条即可
kut6pb4i.png
用双面胶粘着,很容易就撕开,拧出螺丝,即可取出主板
kut6wvcq.png
kut6x1hg.png

{mtitle title="主板全貌"/}

从左上角的“V1.3”字样中不难看出,这是1.3版本的主板,如果你的主板没有这个字样,则是1.0版本的主板。两者的短接方式不同,需要注意
kut7fce7.png

{mtitle title="V1.3短接的地方"/}

kut7gxpl.png
{mtitle title="V1.0短接的地方"/}
图源:https://www.youtube.com/watch?v=qy9_xCs4oS4

安装Amlogic USB Burning Tool

{cloud title="Amlogic_USB_Burning_Tool_v3.1.0" type="default" url="https://cloud.kanoer.net/Software/Windows/Amlogic_USB_Burning_Tool_v3.1.0/" password=""/}

amrbian镜像下载

{cloud title="armbian5.67" type="default" url="https://cloud.kanoer.net/Img/Linux/armbian/" password=""/}

开始刷机

1、使用双公头usb线一头连接玩客云靠近hdmi接口的usb接口,一头连接至电脑,台式机请连接后面的USB口,暂时不要通电。
2、打开usb burnning tool软件,选择刚才下载好的镜像
kutbbwxi.png

{mtitle title="确认如图设置"/}
3、使用镊子按照下图(V1.3版主板)短接触点,并保持不要松手,给玩客云通电电脑会有连接成功声音及图示,显示连接成功后松开短接点,点击软件上“开始”
kut7fce7.png
kutbgzws.png
kutbhb6h.png
如显示红字错误,可以将usb线拨下停2秒再插上,重新短接触点看见刷机进度进行后松手(放心这个刷不坏),整个过程约3~5分钟,待软件上显示烧录成功后,点击停止,并关闭软件,拨下usb线,断开电源。
kutbul2b.png

开始使用amrbian

将玩客云连上网线和电源,系统会自行启动。
kutbypzt.png
查看路由器后台,获取玩客云IP地址
kutc25cw.png
打开SSH工具,登入到amrbian,默认用户:root,默认密码:1234
kutc3zei.png
第一次登入会要求更改root账户密码,因为我已经更改过了,所以没有提示。更改的时候,第一次输入的是原始密码,即:1234,然后回车,输入新的密码,回车,再次输入新的密码,完成。

安装transmission

输入命令 apt install transmission-daemon

root@OneCloud:~# apt install transmission-daemon
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libevent-2.0-5 libminiupnpc10 libnatpmp1 transmission-common
Suggested packages:
  minissdpd natpmp-utils
Recommended packages:
  minissdpd transmission-cli
The following NEW packages will be installed:
  libevent-2.0-5 libminiupnpc10 libnatpmp1 transmission-common transmission-daemon
0 upgraded, 5 newly installed, 0 to remove and 129 not upgraded.
Need to get 642 kB of archives.
After this operation, 1,578 kB of additional disk space will be used.
Do you want to continue? [Y/n]

输入 y 进行下载安装

root@OneCloud:~# apt install transmission-daemon
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libevent-2.0-5 libminiupnpc10 libnatpmp1 transmission-common
Suggested packages:
  minissdpd natpmp-utils
Recommended packages:
  minissdpd transmission-cli
The following NEW packages will be installed:
  libevent-2.0-5 libminiupnpc10 libnatpmp1 transmission-common transmission-daemon
0 upgraded, 5 newly installed, 0 to remove and 129 not upgraded.
Need to get 642 kB of archives.
After this operation, 1,578 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://security.debian.org stretch/updates/main armhf transmission-common all 2.92-2+deb9u2 [288 kB]
Get:2 http://httpredir.debian.org/debian stretch/main armhf libevent-2.0-5 armhf 2.0.21-stable-3 [134 kB]
Get:3 http://httpredir.debian.org/debian stretch/main armhf libminiupnpc10 armhf 1.9.20140610-4 [25.7 kB]
Get:4 http://httpredir.debian.org/debian stretch/main armhf libnatpmp1 armhf 20110808-4+b1 [8,338 B]
Get:5 http://security.debian.org stretch/updates/main armhf transmission-daemon armhf 2.92-2+deb9u2 [186 kB]
Fetched 642 kB in 33s (18.9 kB/s)
Selecting previously unselected package transmission-common.
(Reading database ... 30447 files and directories currently installed.)
Preparing to unpack .../transmission-common_2.92-2+deb9u2_all.deb ...
Unpacking transmission-common (2.92-2+deb9u2) ...
Selecting previously unselected package libevent-2.0-5:armhf.
Preparing to unpack .../libevent-2.0-5_2.0.21-stable-3_armhf.deb ...
Unpacking libevent-2.0-5:armhf (2.0.21-stable-3) ...
Selecting previously unselected package libminiupnpc10:armhf.
Preparing to unpack .../libminiupnpc10_1.9.20140610-4_armhf.deb ...
Unpacking libminiupnpc10:armhf (1.9.20140610-4) ...
Selecting previously unselected package libnatpmp1:armhf.
Preparing to unpack .../libnatpmp1_20110808-4+b1_armhf.deb ...
Unpacking libnatpmp1:armhf (20110808-4+b1) ...
Selecting previously unselected package transmission-daemon.
Preparing to unpack .../transmission-daemon_2.92-2+deb9u2_armhf.deb ...
Unpacking transmission-daemon (2.92-2+deb9u2) ...
Setting up libminiupnpc10:armhf (1.9.20140610-4) ...
Setting up libnatpmp1:armhf (20110808-4+b1) ...
Setting up transmission-common (2.92-2+deb9u2) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for systemd (232-25+deb9u6) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libevent-2.0-5:armhf (2.0.21-stable-3) ...
Setting up transmission-daemon (2.92-2+deb9u2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/transmission-daemon.service → /lib/systemd/system/transmission-daemon.service.
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for systemd (232-25+deb9u6) ...
root@OneCloud:~#

安装完成,输入IP:9091访问transmission web控制台,不出意外会被拒绝连接
kutchsgo.png
修改配置文件: /etc/transmission-daemon/settings.json
kutcoguv.png
"rpc-whitelist": "127.0.0.1" 改成 "rpc-whitelist": "*" 表示允许所有IP访问,保存文件。
重启transmission: systemctl restart transmission-daemon

汉化transmission

项目地址:https://github.com/ronggang/transmission-web-control
下载安装脚本 wget https://github.com/ronggang/transmission-web-control/raw/master/release/install-tr-control-cn.sh
执行安装 输入 1 安装 bash install-tr-control-cn.sh
完成后重启 systemctl restart transmission-daemon
以下为全程演示:

root@OneCloud:~# wget https://github.com/ronggang/transmission-web-control/raw/master/release/install-tr-control-cn.sh
--2021-10-16 05:42:24--  https://github.com/ronggang/transmission-web-control/raw/master/release/install-tr-control-cn.sh
Resolving github.com (github.com)... 20.205.243.166
Connecting to github.com (github.com)|20.205.243.166|:443... connected.
HTTP request sent, awaiting response... No data received.
Retrying.

--2021-10-16 05:42:40--  (try: 2)  https://github.com/ronggang/transmission-web-control/raw/master/release/install-tr-control-cn.sh
Connecting to github.com (github.com)|20.205.243.166|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/ronggang/transmission-web-control/master/release/install-tr-control-cn.sh [following]
--2021-10-16 05:42:40--  https://raw.githubusercontent.com/ronggang/transmission-web-control/master/release/install-tr-control-cn.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.111.133, 185.199.110.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13561 (13K) [text/plain]
Saving to: ‘install-tr-control-cn.sh’

install-tr-control-cn.sh                100%[============================================================================>]  13.24K  3.02KB/s    in 4.4s

2021-10-16 05:42:48 (3.02 KB/s) - ‘install-tr-control-cn.sh’ saved [13561/13561]

root@OneCloud:~# bash install-tr-control-cn.sh
/usr/bin/whoami

        欢迎使用 Transmission Web Control 中文安装脚本。
        官方帮助文档:https://github.com/ronggang/transmission-web-control/wiki
        安装脚本版本:1.2.3

        1. 安装最新的发布版本(release);
        2. 安装指定版本,可用于降级;
        3. 恢复到官方UI;
        4. 重新下载安装脚本(install-tr-control-cn.sh);
        5. 检测 Transmission 是否已启动;
        6. 指定安装目录;
        9. 安装最新代码库中的内容(master);
        ===================
        0. 退出安装;

        请输入对应的数字:1

--2021-10-16 05:48:03--  https://api.github.com/repos/ronggang/transmission-web-control/releases/latest
Resolving api.github.com (api.github.com)... 192.30.255.116
Connecting to api.github.com (api.github.com)|192.30.255.116|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5884 (5.7K) [application/json]
Saving to: ‘STDOUT’

-                                       100%[============================================================================>]   5.75K  --.-KB/s    in 0.003s

2021-10-16 05:48:05 (2.16 MB/s) - written to stdout [5884/5884]


<< 2021-10-16 05:48:05 >> == 开始 ==
<< 2021-10-16 05:48:05 >>
<< 2021-10-16 05:48:05 >> 当前 Transmission Web 目录为:  /usr/share/transmission/web
<< 2021-10-16 05:48:05 >> 您正在使用指定版本安装,版本: 1.6.1-update1
<< 2021-10-16 05:48:05 >> 正在尝试指定版本 1.6.1-update1
<< 2021-10-16 05:48:05 >> 正在下载 Transmission Web Control...

--2021-10-16 05:48:06--  https://github.com/ronggang/transmission-web-control/archive/v1.6.1-update1.tar.gz
Resolving github.com (github.com)... 20.205.243.166
Connecting to github.com (github.com)|20.205.243.166|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/ronggang/transmission-web-control/tar.gz/v1.6.1-update1 [following]
--2021-10-16 05:48:06--  https://codeload.github.com/ronggang/transmission-web-control/tar.gz/v1.6.1-update1
Resolving codeload.github.com (codeload.github.com)... 20.205.243.165
Connecting to codeload.github.com (codeload.github.com)|20.205.243.165|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-gzip]
Saving to: ‘v1.6.1-update1.tar.gz’

v1.6.1-update1.tar.gz                       [    <=>                                                                      ]   1.15M  1.74MB/s    in 0.7s

2021-10-16 05:48:08 (1.74 MB/s) - ‘v1.6.1-update1.tar.gz’ saved [1206252]

<< 2021-10-16 05:48:08 >> 下载完成,正在准备安装...
<< 2021-10-16 05:48:08 >> 正在解压安装包...
<< 2021-10-16 05:48:08 >> 正在复制安装包...
<< 2021-10-16 05:48:08 >> 正在设置权限,大约需要一分钟 ...
<< 2021-10-16 05:48:15 >> Transmission Web Control 安装完成!
<< 2021-10-16 05:48:15 >> 正在清理安装包...
<< 2021-10-16 05:48:15 >> 安装脚本执行完成。如遇到问题请查看:https://github.com/ronggang/transmission-web-control/wiki
<< 2021-10-16 05:48:15 >> == 结束 ==

root@OneCloud:~# systemctl restart transmission-daemon
root@OneCloud:~#

刷新页面,可以看到汉化完成
kute09mv.png

挂载移动硬盘

连接好硬盘后输入命令 fdisk -l 查看硬盘状态

root@OneCloud:~# fdisk -l
Disk /dev/zram0: 50 MiB, 52428800 bytes, 12800 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mmcblk0: 7.3 GiB, 7818182656 bytes, 15269888 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0000fde5

Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk0p1      16065 14964479 14948415  7.1G 83 Linux


Disk /dev/mmcblk0boot1: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0000fde5

Device              Boot Start     End Sectors  Size Id Type
/dev/mmcblk0boot1p1      16065 7727264 7711200  3.7G  b W95 FAT32


Disk /dev/mmcblk0boot0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0000fde5

Device              Boot Start     End Sectors  Size Id Type
/dev/mmcblk0boot0p1      16065 7727264 7711200  3.7G  b W95 FAT32


Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 0F191B0D-5858-9090-8081-828310111213

Device     Start       End   Sectors   Size Type
/dev/sda1   2048 625137344 625135297 298.1G Microsoft basic data
root@OneCloud:~#

可以看到300G的硬盘已经被系统识别,但是文件格式是NTFS格式,无法直接挂载,我们需要安装 ntfs-3g 来挂载。输入命令 apt-get install ntfs-3g 安装

root@OneCloud:~# apt-get install ntfs-3g
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libntfs-3g871
The following packages will be upgraded:
  libntfs-3g871 ntfs-3g
2 upgraded, 0 newly installed, 0 to remove and 127 not upgraded.
Need to get 0 B/557 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 30587 files and directories currently installed.)
Preparing to unpack .../ntfs-3g_1%3a2016.2.22AR.1+dfsg-1+deb9u1_armhf.deb ...
Unpacking ntfs-3g (1:2016.2.22AR.1+dfsg-1+deb9u1) over (1:2016.2.22AR.1+dfsg-1) ...
Preparing to unpack .../libntfs-3g871_1%3a2016.2.22AR.1+dfsg-1+deb9u1_armhf.deb ...
Unpacking libntfs-3g871 (1:2016.2.22AR.1+dfsg-1+deb9u1) over (1:2016.2.22AR.1+dfsg-1) ...
Processing triggers for initramfs-tools (0.130) ...
ln: failed to create hard link '/boot/initrd.img-3.10.108.dpkg-bak' => '/boot/initrd.img-3.10.108': Operation not permitted
update-initramfs: Generating /boot/initrd.img-3.10.108
update-initramfs: Converting to u-boot format
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libntfs-3g871 (1:2016.2.22AR.1+dfsg-1+deb9u1) ...
Setting up ntfs-3g (1:2016.2.22AR.1+dfsg-1+deb9u1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for initramfs-tools (0.130) ...
ln: failed to create hard link '/boot/initrd.img-3.10.108.dpkg-bak' => '/boot/initrd.img-3.10.108': Operation not permitted
update-initramfs: Generating /boot/initrd.img-3.10.108
update-initramfs: Converting to u-boot format
root@OneCloud:~#

创建挂载点: mkdir /mnt/sda1
挂载硬盘到sda1文件夹: mount -t ntfs-3g /dev/sda1 /mnt/sda1
输入 df-h 查看挂载情况如下,磁盘已被成功挂载

root@OneCloud:~# mount -t ntfs-3g /dev/sda1 /mnt/sda1
root@OneCloud:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            395M     0  395M   0% /dev
tmpfs            80M  5.5M   74M   7% /run
/dev/system     6.7G  872M  5.8G  13% /
tmpfs           397M     0  397M   0% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           397M     0  397M   0% /sys/fs/cgroup
tmpfs           397M  4.0K  397M   1% /tmp
/dev/boot        32M   15M   18M  46% /boot
/dev/zram0       49M  1.4M   44M   4% /var/log
tmpfs            80M     0   80M   0% /run/user/0
/dev/sda1       299G   97G  202G  33% /mnt/sda1

安装samba

输入命令: apt install samba ,输入 y 确认安装,消耗的时间视网络情况而异

root@OneCloud:~# apt install samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libavahi-client3 libavahi-common-data libavahi-common3 libcups2 libfile-copy-recursive-perl libldb1 libpython2.7 libpython2.7-minimal libpython2.7-stdlib
  libtalloc2 libtdb1 libtevent0 libwbclient0 python-crypto python-dnspython python-ldb python-samba python-talloc python-tdb python2.7 python2.7-minimal
  samba-common samba-common-bin samba-libs tdb-tools update-inetd
Suggested packages:
  cups-common python-crypto-dbg python-crypto-doc python-gpgme python2.7-doc binfmt-support bind9 bind9utils ctdb ldb-tools smbldap-tools winbind ufw
  heimdal-clients
Recommended packages:
  attr samba-dsdb-modules samba-vfs-modules
The following NEW packages will be installed:
  libavahi-client3 libavahi-common-data libavahi-common3 libcups2 libfile-copy-recursive-perl libldb1 libpython2.7 libtalloc2 libtdb1 libtevent0
  libwbclient0 python-crypto python-dnspython python-ldb python-samba python-talloc python-tdb samba samba-common samba-common-bin samba-libs tdb-tools
  update-inetd
The following packages will be upgraded:
  libpython2.7-minimal libpython2.7-stdlib python2.7 python2.7-minimal
4 upgraded, 23 newly installed, 0 to remove and 123 not upgraded.
Need to get 7,317 kB/13.2 MB of archives.
After this operation, 41.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://security.debian.org stretch/updates/main armhf samba-libs armhf 2:4.5.16+dfsg-1+deb9u4 [4,523 kB]
Get:2 http://security.debian.org stretch/updates/main armhf python-samba armhf 2:4.5.16+dfsg-1+deb9u4 [1,173 kB]
Get:3 http://security.debian.org stretch/updates/main armhf samba-common all 2:4.5.16+dfsg-1+deb9u4 [175 kB]
Get:4 http://security.debian.org stretch/updates/main armhf samba-common-bin armhf 2:4.5.16+dfsg-1+deb9u4 [563 kB]
Get:5 http://security.debian.org stretch/updates/main armhf samba armhf 2:4.5.16+dfsg-1+deb9u4 [883 kB]
Fetched 6,752 kB in 1s (5,645 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libwbclient0:armhf.
(Reading database ... 30587 files and directories currently installed.)
Preparing to unpack .../00-libwbclient0_2%3a4.5.16+dfsg-1+deb9u4_armhf.deb ...
Unpacking libwbclient0:armhf (2:4.5.16+dfsg-1+deb9u4) ...
Preparing to unpack .../01-python2.7_2.7.13-2+deb9u5_armhf.deb ...
Unpacking python2.7 (2.7.13-2+deb9u5) over (2.7.13-2+deb9u3) ...
Preparing to unpack .../02-libpython2.7-stdlib_2.7.13-2+deb9u5_armhf.deb ...
Unpacking libpython2.7-stdlib:armhf (2.7.13-2+deb9u5) over (2.7.13-2+deb9u3) ...
Preparing to unpack .../03-python2.7-minimal_2.7.13-2+deb9u5_armhf.deb ...
Unpacking python2.7-minimal (2.7.13-2+deb9u5) over (2.7.13-2+deb9u3) ...
Preparing to unpack .../04-libpython2.7-minimal_2.7.13-2+deb9u5_armhf.deb ...
Unpacking libpython2.7-minimal:armhf (2.7.13-2+deb9u5) over (2.7.13-2+deb9u3) ...
Selecting previously unselected package python-dnspython.
Preparing to unpack .../05-python-dnspython_1.15.0-1+deb9u1_all.deb ...
Unpacking python-dnspython (1.15.0-1+deb9u1) ...
Selecting previously unselected package python-crypto.
Preparing to unpack .../06-python-crypto_2.6.1-7_armhf.deb ...
Unpacking python-crypto (2.6.1-7) ...
Selecting previously unselected package libtalloc2:armhf.
Preparing to unpack .../07-libtalloc2_2.1.8-1_armhf.deb ...
Unpacking libtalloc2:armhf (2.1.8-1) ...
Selecting previously unselected package libtdb1:armhf.
Preparing to unpack .../08-libtdb1_1.3.11-2_armhf.deb ...
Unpacking libtdb1:armhf (1.3.11-2) ...
Selecting previously unselected package libtevent0:armhf.
Preparing to unpack .../09-libtevent0_0.9.31-1_armhf.deb ...
Unpacking libtevent0:armhf (0.9.31-1) ...
Selecting previously unselected package libldb1:armhf.
Preparing to unpack .../10-libldb1_2%3a1.1.27-1+deb9u2_armhf.deb ...
Unpacking libldb1:armhf (2:1.1.27-1+deb9u2) ...
Selecting previously unselected package libpython2.7:armhf.
Preparing to unpack .../11-libpython2.7_2.7.13-2+deb9u5_armhf.deb ...
Unpacking libpython2.7:armhf (2.7.13-2+deb9u5) ...
Selecting previously unselected package python-ldb.
Preparing to unpack .../12-python-ldb_2%3a1.1.27-1+deb9u2_armhf.deb ...
Unpacking python-ldb (2:1.1.27-1+deb9u2) ...
Selecting previously unselected package python-tdb.
Preparing to unpack .../13-python-tdb_1.3.11-2_armhf.deb ...
Unpacking python-tdb (1.3.11-2) ...
Selecting previously unselected package python-talloc.
Preparing to unpack .../14-python-talloc_2.1.8-1_armhf.deb ...
Unpacking python-talloc (2.1.8-1) ...
Selecting previously unselected package libavahi-common-data:armhf.
Preparing to unpack .../15-libavahi-common-data_0.6.32-2_armhf.deb ...
Unpacking libavahi-common-data:armhf (0.6.32-2) ...
Selecting previously unselected package libavahi-common3:armhf.
Preparing to unpack .../16-libavahi-common3_0.6.32-2_armhf.deb ...
Unpacking libavahi-common3:armhf (0.6.32-2) ...
Selecting previously unselected package libavahi-client3:armhf.
Preparing to unpack .../17-libavahi-client3_0.6.32-2_armhf.deb ...
Unpacking libavahi-client3:armhf (0.6.32-2) ...
Selecting previously unselected package libcups2:armhf.
Preparing to unpack .../18-libcups2_2.2.1-8+deb9u6_armhf.deb ...
Unpacking libcups2:armhf (2.2.1-8+deb9u6) ...
Selecting previously unselected package samba-libs:armhf.
Preparing to unpack .../19-samba-libs_2%3a4.5.16+dfsg-1+deb9u4_armhf.deb ...
Unpacking samba-libs:armhf (2:4.5.16+dfsg-1+deb9u4) ...
Selecting previously unselected package python-samba.
Preparing to unpack .../20-python-samba_2%3a4.5.16+dfsg-1+deb9u4_armhf.deb ...
Unpacking python-samba (2:4.5.16+dfsg-1+deb9u4) ...
Selecting previously unselected package samba-common.
Preparing to unpack .../21-samba-common_2%3a4.5.16+dfsg-1+deb9u4_all.deb ...
Unpacking samba-common (2:4.5.16+dfsg-1+deb9u4) ...
Selecting previously unselected package samba-common-bin.
Preparing to unpack .../22-samba-common-bin_2%3a4.5.16+dfsg-1+deb9u4_armhf.deb ...
Unpacking samba-common-bin (2:4.5.16+dfsg-1+deb9u4) ...
Selecting previously unselected package tdb-tools.
Preparing to unpack .../23-tdb-tools_1.3.11-2_armhf.deb ...
Unpacking tdb-tools (1.3.11-2) ...
Selecting previously unselected package libfile-copy-recursive-perl.
Preparing to unpack .../24-libfile-copy-recursive-perl_0.38-1_all.deb ...
Unpacking libfile-copy-recursive-perl (0.38-1) ...
Selecting previously unselected package update-inetd.
Preparing to unpack .../25-update-inetd_4.44_all.deb ...
Unpacking update-inetd (4.44) ...
Selecting previously unselected package samba.
Preparing to unpack .../26-samba_2%3a4.5.16+dfsg-1+deb9u4_armhf.deb ...
Unpacking samba (2:4.5.16+dfsg-1+deb9u4) ...
Setting up python-dnspython (1.15.0-1+deb9u1) ...
Setting up libtdb1:armhf (1.3.11-2) ...
Setting up libwbclient0:armhf (2:4.5.16+dfsg-1+deb9u4) ...
Setting up python-crypto (2.6.1-7) ...
Processing triggers for mime-support (3.60) ...
Setting up samba-common (2:4.5.16+dfsg-1+deb9u4) ...

Creating config file /etc/samba/smb.conf with new version
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for systemd (232-25+deb9u6) ...
Setting up tdb-tools (1.3.11-2) ...
update-alternatives: using /usr/bin/tdbbackup.tdbtools to provide /usr/bin/tdbbackup (tdbbackup) in auto mode
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libtalloc2:armhf (2.1.8-1) ...
Setting up libpython2.7-minimal:armhf (2.7.13-2+deb9u5) ...
Setting up libpython2.7-stdlib:armhf (2.7.13-2+deb9u5) ...
Setting up python2.7-minimal (2.7.13-2+deb9u5) ...
Setting up libfile-copy-recursive-perl (0.38-1) ...
Setting up libavahi-common-data:armhf (0.6.32-2) ...
Setting up update-inetd (4.44) ...
Setting up python2.7 (2.7.13-2+deb9u5) ...
Setting up libtevent0:armhf (0.9.31-1) ...
Setting up libpython2.7:armhf (2.7.13-2+deb9u5) ...
Setting up libavahi-common3:armhf (0.6.32-2) ...
Setting up python-talloc (2.1.8-1) ...
Setting up python-tdb (1.3.11-2) ...
Setting up libldb1:armhf (2:1.1.27-1+deb9u2) ...
Setting up libavahi-client3:armhf (0.6.32-2) ...
Setting up libcups2:armhf (2.2.1-8+deb9u6) ...
Setting up python-ldb (2:1.1.27-1+deb9u2) ...
Setting up samba-libs:armhf (2:4.5.16+dfsg-1+deb9u4) ...
Setting up python-samba (2:4.5.16+dfsg-1+deb9u4) ...
Setting up samba-common-bin (2:4.5.16+dfsg-1+deb9u4) ...
Setting up samba (2:4.5.16+dfsg-1+deb9u4) ...
Adding group `sambashare' (GID 115) ...
Done.
Samba is not being run as an AD Domain Controller, masking samba-ad-dc-service.
Please ignore the following error about deb-systemd-helper not finding samba-ad-dc-service.
Created symlink /etc/systemd/system/multi-user.target.wants/nmbd.service → /lib/systemd/system/nmbd.service.
Failed to preset unit: Unit file /etc/systemd/system/samba-ad-dc.service is masked.
/usr/bin/deb-systemd-helper: error: systemctl preset failed on samba-ad-dc.service: No such file or directory
Created symlink /etc/systemd/system/multi-user.target.wants/smbd.service → /lib/systemd/system/smbd.service.
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for systemd (232-25+deb9u6) ...
root@OneCloud:~#

添加用户和密码,输入 smbpasswd -a root #root是想用的samba账号,接着会让你输入两次密码,输入即可。
编辑 /etc/samba/smb.conf 文件,在末尾处添加以下内容:

[share]
comment = 1T-share
# 共享目录
path = /mnt/sda1 
create mask = 0700
directory mask = 0700
# 用于登录的账户
valid users = root
force user = root
force group = root
# 是否公开分享
public = yes
# 是否允许来宾用户访问
guest ok = yes
# 是否只读
read only = no
# 是否可被浏览
browseable = yes
available = yes
writable = yes

保存后重启samba服务 systemctl restart smbd ,再通过电脑添加网络位置,用户选择root,输入你设置好的密码即可。
kutg5r1m.png

{mtitle title="成功访问samba服"/}

至此,本文完结。


间接性发奋图强,持续性混吃等死