1、安裝Samba服務器
使用默認的USE標記直接執行命令
[cpp] www.2cto.com print?
emerge samba
2、配置/etc/samba/smb.conf
首先拷貝/etc/samba/smb.conf.default然後根據自己的需要修改
修改後的smb.conf文件如下
[cpp] www.2cto.com
#======================= Global Settings =====================================
[global]
guest account = nobody
netbios name = yan-laptop
workgroup = WORKGROUP
server string = Samba Server
security = share
load printers = no
log file = /var/log/samba/log.%m
max log size = 50
wins support = yes
dns proxy = no
create mode = 0777
force create mode = 0777
directory mode = 0777
force directory mode = 0777
[Share]
path = /home/samba
browseable = yes
guest ok = yes
writeable = yes
3、創建文件夾
[cpp] www.2cto.com
sudo mkdir /home/samba
chmod 777 /home/samba
4、重啟samba服務
[cpp] www.2cto.com
sudo /etc/init.d/samba restart
5、在windows下可以讀寫共享的文件夾
win 7下的截圖