6.树莓派安装Samba服务

安装

sudo apt-get install samba samba-common-bin

备份并编辑 /etc/samba/smb.conf 文件

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.orig
sudonano /etc/samba/smb.conf

配置文件内容

[global]
security = user
encrypt passwords = true
guest account = nobody
map to guest = bad user

#======================= Share Definitions =======================
[RPi]
comment = Nas data folder
path = /home/hdd/
browseable = yes
writable = yes
guest ok = yes
public = yes

创建Samba用户

sudo touch /etc/samba/smbpasswd
sudo smbpasswd -a pi #此处用户名为pi

重启Samba服务

sudo /etc/init.d/samba restart

你可能感兴趣的:(6.树莓派安装Samba服务)