一. Ubuntu 11.04下Samba的安裝:
$ sudo apt-get insall samba
$ sudo apt-get install smbfs
二. 創建共享目錄:
$ mkdir /home/work/samba_share
$ sodu chmod 777 /home/work/samba_share #若不更改權限,windows下不能寫入(適用於只讀共享)!!!
三. 修改Samba配置文件:
$ cp /etc/samba/smb.conf /etc/samba/smb.conf.old # 備份samba的配置文件
$ sudo gedit /etc/samba/smb.conf
找到 security = user 將它改成 security = share
把光標移動配置文件的最後一行,在下面加入以下配行
[home]
comment = homepath
path = /home/work/samba_share
writable = yes
locking = no
public = yes
guest ok = yes
四. 重啟Samba服務
# sudo /etc/init.d/smbd restart
OK!