二、透過SSH 連線來設定 Samba
1. 使用root進行設定: sudo -s
2. 安裝Samba,執行:apt-get install samba samba-common
3. 檢查版本,執行:smbd --version (版本為:Version 3.6.3)
4. 安裝建議套件,執行:apt-get install python-glade2 system-config-samba
5. 備份設定檔,執行: cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
6. 移除舊設定檔,執行: rm /etc/samba/smb.conf
7. 新建設定檔,執行: touch /etc/samba/smb.conf
8. 修改設定檔內容如下: vi /etc/samba/smb.conf
9. 存檔後,重啟服務: service smbd restart
10. 添加samba user,執行: smbpasswd -a jack
11. 應該可以從windows系統看到 分享的資料夾了,但是不能寫入,因為權限設定還沒改。
12. 執行: chmod -R 777 /btfiles (btfiles是我要分享出來的資料夾)
#=================== Global Settings ====================
[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = ubuntu
security = user
map to guest = bad user
dns proxy = no
#================== Share Definitions ===================
[MyShare]
path = /btfiles
browsable =yes
writable = yes
guest ok = no
read only = no
1. 使用root進行設定: sudo -s
2. 安裝Samba,執行:apt-get install samba samba-common
3. 檢查版本,執行:smbd --version (版本為:Version 3.6.3)
4. 安裝建議套件,執行:apt-get install python-glade2 system-config-samba
5. 備份設定檔,執行: cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
6. 移除舊設定檔,執行: rm /etc/samba/smb.conf
7. 新建設定檔,執行: touch /etc/samba/smb.conf
8. 修改設定檔內容如下: vi /etc/samba/smb.conf
9. 存檔後,重啟服務: service smbd restart
10. 添加samba user,執行: smbpasswd -a jack
11. 應該可以從windows系統看到 分享的資料夾了,但是不能寫入,因為權限設定還沒改。
12. 執行: chmod -R 777 /btfiles (btfiles是我要分享出來的資料夾)
#=================== Global Settings ====================
[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = ubuntu
security = user
map to guest = bad user
dns proxy = no
#================== Share Definitions ===================
[MyShare]
path = /btfiles
browsable =yes
writable = yes
guest ok = no
read only = no