1. 安装
$ sudo apt-get install samba
2. 配置smb用户密码
# cat /etc/passwd | mksmbpasswd > /etc/samba/smbpasswd
3. 为当前用户配置Samba密码
# smbpasswd -a scue
New SMB password:
Retype new SMB password:
Added user scue.
4. 配置/etc/samba/smb.conf(假定现在要共享目录/media/Storage)
[global] server string = Samba Server security = user encrypt passwords = yes smb passwd file = /etc/samba/smbpasswd [Storage] workgroup = scue security = scue netbios name = scue path = /media/Storage browseable = yes writeable = yes guest ok = yes read only = no
5. 重启smb服务
sudo restart smbd sudo restart nmbd
6. 在Windows中右击“我的电脑”(或计算机),映射网络驱动器,输入Linux中的Samba服务地址\192.168.1.110Stroage