[global]
workgroup = CNMC #這台機器在網芳中的工作群組
server string = Samba Server at CNMC20 #電腦說明(介紹)
netbios name = SCHOOL #電腦名稱(如無特殊用途可不設)
hosts allow = 140.122.126. #允許連線的IP,用空白分隔
(140.122.126. 代表 140.122.126.0~255)
; hosts deny = 61. #不允許連線的IP(設定方法同上)
; load printers = yes #有要分享印表機請打開
; printcap name = /etc/printcap #印表機的設定位置
; printcap name = lpstat
; printing = bsd #當linux不支援你的印表機時,要設一下
guest account = ftp #不用輸入密碼的帳號
log file = /var/log/log.%m #log檔的位置
max log size = 50 #log檔的最大容量
security = share #分享的模式,共四種
share(windows端不用密碼)
user(windwos端要輸入使用使用者或密碼)
server(透過密碼伺服器連線)
domain(透過密碼伺服器連線)
; password server = #密碼伺服器名稱(配合server、domain)
encrypt passwords = yes #密碼加密
# for Traditional Chinese Users
client code page=950 #如果要顯示出中文檔名的話、請打開(還有其他語系)
; coding system=cap
#============================ Share Definitions ==============================
[homes] #這是定義使用者登入之後的家目錄
comment = Home Directories #註解
browseable = no #能否瀏覽
writeable = yes #能否寫入
[public]
comment = Public Stuff
path = /home/samba #路徑
public = yes #公開,免密碼
writeable = yes
printable = no
write list = @staff
[ftp]
comment = ftp at cnmc20
path = /home/ftp
public = yes
writeable = yes