树莓派 SMB共享Samba 安装部署

安装Samba
apt-get install samba

修改配置文件/etc/samba/smb.conf
添加以下全局[global]配置

guest account = root
read size = 65536
write cache size = 262144
aio read size = 16384
aio write size = 16384
large readwrite = yes

在最后添加

[sda1]
comment = sda1
path = /mnt/sda1
read only = no
create mask = 0777
directory mask = 0777
guest ok = yes
browseable = yes

启动、停止、重启

/etc/init.d/smbd start | stop | restart
systemctl start | stop | restart smbd.service

参考:
https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Standalone_Server#Creating_a_Basic_authenticated_access_smb.conf_File