安装
subo apt-get install samba
修改 /etc/samba/smb.conf的配置
这里要注意,用root的权限,要不然,你是没有办法保存的
vim smb.conf
#======================= Global Settings =======================
[global]
## Browsing/Identification ###
# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = WORKGROUP
security = user
在最后加下
[username]
comment = All Printers
browseable = @H_404_25@yes
path = /home/username/work
read only = @H_404_25@no
valid users = @username
添加samba 用户 username
smbpasswd -a username
激活samba 用户 username
smbpasswd -e username
重启 samba 服务
systemctl restart smbd.service nmbd.service