Do Note

儒道佛魔修心地

部署文件共享服务在树莓派3B上


1.安装Samba

sudo apt-get update
sudo apt-get install samba samba-common-bin

2.配置账户

sudo useradd pishare #新建账户
sudo passwd pishare #设置密码
sudo smbpasswd -a pishare #添加 Samba 用户
sudo smbpasswd -e pishare #激活用户

3.配置Samba

sudo vi /etc/samba/smb.conf

添加以下内容

[public]
comment = Public Storage
path = /home/pi/share
read only = no
create mask = 0777
directory mask = 0777
guest ok = yes
browseable = yes
smbd restart #重启服务

4.挂载移动硬盘

sudo apt-get install exfat-fuse #支持exfat
sudo fdisk -l #列出所有硬盘
mkdir share #/home/pi下新建share目录用于挂载
sudo mount /dev/sda1 ~/share

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.