安装
- 命令行输入
sudo apt-get install samba设置
- 设置密码(用户名必须是你系统用户)
sudo smbpasswd -a 用户名 - 会让你两次输入密码,有如下提示
New SMB password:
Retype new SMB password:
Added user for 这里会显示你的用户名- 执行
sudo vi /etc/samba/smb.conf - Authentication段找到
#security = user并去掉"#" - 文件尾部添加如下内容
#等号后填写你所共享的目录
path =
comment = NAS Drive
#写入权限
wirteable = yes
browseable = yes
#创建文件权限
create mask = 0777
public = yesreboot重启