SAMBA 設定
1. 設定檔位置/etc/samba/smb.conf
[global]
workgroup = 工作群組
netbios name = 網路上的芳鄰看到的名稱
server string = 說明
client code page = 950 < - - -可以看到中文的編碼
security = user < - - -安全設定, user要密碼 share 無密碼
encrypt passwd = yes 要不要加密的密碼
smb passwd file = /etc/samba/smbpasswd < - - -密碼檔的位置
hosts allow = 192.168.0 172. < - - -沒有設定的話不限制ip有設的話定只有在設定範圍內的ip可以使用這個server
interfaces = 192.168.0.x 設定哪張網路卡可以用
分享的部分設定
[name] < - - -網路上的芳鄰看到的分享名稱
comment = ps < - - - 註解的部分
path = /mnt/xxxx < - - - 分享的路徑
public = yes < - - - 設定yes就是所有人都可以看到
writable = yes < - - -設定yes 是可以寫入
create mode = 644 < - - - 建立檔案的權限
directory mode = 0775 < - - - 建立目錄的權限
2.設定密碼 smbpasswd [-adm ] username
smbpasswd –a 加入一個新使用者
smbpasswd –d 使某個使用者無法使用
smbpasswd –e 跟 –d相反使某個使用者恢復使用
smbpasswd –m 這個username 為機器代碼(Machine Account) ,跟Doman model相關
3.重新啟動
#/etc/rc.d/init.d/smb restart